Reply.php(用来回主题)
疑难问题 if (!$cook_user)
{echo "";}
else {include ("connect.inc.php");
$query = "select * from my_user where user='".$cook_user."'、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 = "ゲストブックに挿入 (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 = "ゲストブックのセット time_close=now(),answer_count=answer_count+1,answer_name='".$cook_user."' where id=".$theme_id;
$res = mysql_query($query);
if ($res)
{echo "";}}}}
?>
width=100%> 作品者 | 内容量 | $query = "select * from guestbook where main_id=".$theme_id." or id=".$theme_id." order by time_open DESC 制限 5 "; $res = mysql_query($query); 関数 TdBackColor() { 静的 $ColorStr; if ($ColorStr=="#ededed") { $ColorStr="#ededed"; } else { $ColorStr="#ededed"; } return($ColorStr); } for ($i=1;$i<=5;$i++) {$row = @mysql_fetch_array($res); if (!$row) ブレーク; $ColorStr=TdBackColor(); echo ""; echo "".$row['name']." | "; $content= str_replace ( "mysinglequotes","'",$row['content']); echo "".$content." | "; } ?>
フォーム>
【本文版权归作者与奥索网共同拥有,如果转下,请注明作者及出处】
http://www.bkjia.com/PHPjc/316586.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/316586.html技術記事 Reply.php(用来回复主题) HTMLHEADTITLE疑难问题/TITLE LINK href=mypic/style.css rel=STYLESHEET type=text/css/HEAD ?php if (!$cook_user) {echo script language='javascript';えー...
|