reply.php (used to reply to topics)
<title>Difficult issues</title>
if (! $cook _user)
{echo "";}
else {include ("connect.inc.php");
$query = "SELECT * from My_user where user= '". $cook _user. "' and password= '". $cook _password. "'";
$res = mysql_query ($query);
if (! $res)
{echo "";}
Include "connect.inc.php";
if ($content) {$c ("'", "mysinglequotes", $content);
$c
$c
$query = "INSERT into guestbook (name,type,content,icon,time_open,time_close,answer_count,answer_name,main_id) VALUES (' ". $cook _user." ', 0, ' ". $content." ', ". $icon.", now (), now (), 1, ' ". $cook _user." ', ". $theme _id.") ";
$res = mysql_query ($query);
if ($res)
{$query = "Update guestbook set Time_close=now (), Answer_count=answer_count+1,answer_name= '". $cook _user. "' Where id= '. $theme _id;
$res = mysql_query ($query);
if ($res)
{echo "";}}}
?>
Last 5 posts in this topic (in reverse order of posting time)
Width=100%>
| Author |
Content |
$query = "SELECT * from Guestbook where main_id=". $theme _id. "or id=". $theme _id. "ORDER by Time_open DESC limit 5"; $res = mysql_query ($query); function Tdbackcolor () {static $ColorStr; if ($ColorStr = = "#ededed") {$ColorStr = "#dedede"; } else {$ColorStr = "#ededed"; } return ($COLORSTR); } for ($i =1; $i <=5; $i + +) {$row = @mysql_fetch_array ($res), if (! $row) break; $ColorStr =tdbackcolor (); echo "
"; echo "
| ". $row [' name ']." | "; $c ("Mysinglequotes", "'", $row [' content ']); echo "
". $content." |
"; } ? >
"The copyright of this article is owned by the author and house Orso near net, if need to reprint, please specify the author and source"
The above describes the Supercalifragilisticexpialidoc imitation Oso Forum (iv), including the supercalifragilisticexpialidoc aspects of the content, I hope that the PHP tutorial interested in a friend helpful.