主题:看这边比其他地方热,所以来求助!快进看看,各位!
为什么这个
<?
include("dbconnect.php"); ?>
<h2>View my guest book.</h2>
<?
$result=mysql_query("select * from guestbook") or die(mysql_error());
while($row=mysql_fetch_array($result))
{
echo"<b>name:</b>";
echo $row["name"];
echo"<br>";
echo"<b>location:</b>";
echo $row["location"];
echo"<br>";
echo"<b>email:</b>";
echo $row["email"];
echo"<br>";
echo"<b>URL:</b>";
echo $row["url"];
echo"<br>";
echo"<b>Comments</b>";
echo $row["comments"];
echo"<br>";
echo"<br>";
echo"<br>";}
mysql_free_result($result);
?>
<h2><a href="sign.php">Sign my guest book!</a></h2>
编译后出现:
View my guest book.
name:"; echo $row["name"]; echo"
"; echo"location:"; echo $row["location"]; echo"
"; echo"email:"; echo $row["email"]; echo"
"; echo"URL:"; echo $row["url"]; echo"
"; echo"Comments"; echo $row["comments"]; echo"
"; echo"
"; echo"
";} mysql_free_result($result); ?>
Sign my guest book!
哪里出现错?
<?
include("dbconnect.php"); ?>
<h2>View my guest book.</h2>
<?
$result=mysql_query("select * from guestbook") or die(mysql_error());
while($row=mysql_fetch_array($result))
{
echo"<b>name:</b>";
echo $row["name"];
echo"<br>";
echo"<b>location:</b>";
echo $row["location"];
echo"<br>";
echo"<b>email:</b>";
echo $row["email"];
echo"<br>";
echo"<b>URL:</b>";
echo $row["url"];
echo"<br>";
echo"<b>Comments</b>";
echo $row["comments"];
echo"<br>";
echo"<br>";
echo"<br>";}
mysql_free_result($result);
?>
<h2><a href="sign.php">Sign my guest book!</a></h2>
编译后出现:
View my guest book.
name:"; echo $row["name"]; echo"
"; echo"location:"; echo $row["location"]; echo"
"; echo"email:"; echo $row["email"]; echo"
"; echo"URL:"; echo $row["url"]; echo"
"; echo"Comments"; echo $row["comments"]; echo"
"; echo"
"; echo"
";} mysql_free_result($result); ?>
Sign my guest book!
哪里出现错?