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 "";}}}} ?>
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn