: PHP/" . phpversion());
}
/* MySQL really hates it when you try to put things with ' or " characters into a database, so strip these...*/
$comments = addslashes ("$comments");
$query = "INSERT INTO guestbook VALUES(','$name', '$email', '$job', '$comments')";
$result = MYSQL_QUERY($query);
?>
<BR><P ALIGN = CENTER>感谢, <?php echo $name; ?>, 您的留言.
<BR><P ALIGN = CENTER><A HREF="guestbook.php3?action=view" onMouseOver="window.status='View your comment now';return true" onMouseOut="window.status=';return true" TITLE="View your comment now">观看留言</A><BR><BR>
<?
}
/* if there's no action given, then we must show the main page */
else {
/* get the number of entries written into the guestbook*/
$query = "SELECT name from guestbook";
$result = MYSQL_QUERY($query);
$number = MYSQL_NUMROWS($result);
if ($number == "") {
$entry = "还没有人留过言"; }
elseif ($number == "1") {
$entry = "目前留言人数1人"; }
else {
$entry = "目前留言人数 $number 人"; }
echo "<CENTER><BR>";
echo "<P>$entry<BR>";
echo "<H4><FONT FACE="Verdana" SIZE="3"><A HREF="guestbook.php3?action=add" onMouseOver="window.status='请您留言';return true" onMouseOut="window.status=';return true" TITLE="Add your name to our guestbook">请您留言</A></FONT></H4>";
if ($number > "") {
echo "<H4><FONT FACE="Verdana" SIZE="3"><A HREF="guestbook.php3?action=view" onMouseOver="window.status='观看留言';return true" onMouseOut="window.status=';return true" TITLE="View the names in our guestbook">观看留言</A></FONT></H4>"; }
echo "</P></CENTER>";
}
?>
<BR><SMALL><CENTER>版权所有:<A HREF="http://personal.668.cc/haitang/index.htm" onMouseOver="window.status='pert';return true" onMouseOut="window.status=';return true" TITLE="pert">无边天际</A></CENTER></SMALL>
</FONT>
</BODY>
</HTML>
}
/* MySQL really hates it when you try to put things with ' or " characters into a database, so strip these...*/
$comments = addslashes ("$comments");
$query = "INSERT INTO guestbook VALUES(','$name', '$email', '$job', '$comments')";
$result = MYSQL_QUERY($query);
?>
<BR><P ALIGN = CENTER>感谢, <?php echo $name; ?>, 您的留言.
<BR><P ALIGN = CENTER><A HREF="guestbook.php3?action=view" onMouseOver="window.status='View your comment now';return true" onMouseOut="window.status=';return true" TITLE="View your comment now">观看留言</A><BR><BR>
<?
}
/* if there's no action given, then we must show the main page */
else {
/* get the number of entries written into the guestbook*/
$query = "SELECT name from guestbook";
$result = MYSQL_QUERY($query);
$number = MYSQL_NUMROWS($result);
if ($number == "") {
$entry = "还没有人留过言"; }
elseif ($number == "1") {
$entry = "目前留言人数1人"; }
else {
$entry = "目前留言人数 $number 人"; }
echo "<CENTER><BR>";
echo "<P>$entry<BR>";
echo "<H4><FONT FACE="Verdana" SIZE="3"><A HREF="guestbook.php3?action=add" onMouseOver="window.status='请您留言';return true" onMouseOut="window.status=';return true" TITLE="Add your name to our guestbook">请您留言</A></FONT></H4>";
if ($number > "") {
echo "<H4><FONT FACE="Verdana" SIZE="3"><A HREF="guestbook.php3?action=view" onMouseOver="window.status='观看留言';return true" onMouseOut="window.status=';return true" TITLE="View the names in our guestbook">观看留言</A></FONT></H4>"; }
echo "</P></CENTER>";
}
?>
<BR><SMALL><CENTER>版权所有:<A HREF="http://personal.668.cc/haitang/index.htm" onMouseOver="window.status='pert';return true" onMouseOut="window.status=';return true" TITLE="pert">无边天际</A></CENTER></SMALL>
</FONT>
</BODY>
</HTML>