if($_post['submit']){
$sql = insert into guestbook (id,username,title,content,lastdate) values (null,'$_post[username]','$_post[title]','$_post[content]',now());
echo $sql;
mysql_query($sql);
echo 成功;
}
?>
conn.php
$conn=@mysql_connect(localhost,root,) or die (连接错误);//数据库连接
mysql_select_db(newdb,$conn);//
mysql_query(set names gbk);
?>
