include_once 'Conn.php';
if($_POST['Submit']){
$sql = "ゲストブックに挿入 (ID,userName,title,content,lastdate) 値 (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");
?>