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) {$content = Str_replace ("'", "mysinglequotes", $content);
$content =htmlspecialchars ($content);
$content =nl2br ($content);
$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 ']." | "; $content = Str_replace ("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"
http://www.bkjia.com/PHPjc/316586.html www.bkjia.com true http://www.bkjia.com/PHPjc/316586.html techarticle reply.php (used to reply to topics) Htmlheadtitle difficult problem/title LINK href=mypic/style.css rel=stylesheet type=text/css/head? php if (!$ Cook_user) {echo script language= ' JavaScript '; E ...