Heim > Fragen und Antworten > Hauptteil
<?php
include ("conn.php");
$id=$_POST['id'];
$user=$_POST['user'];
$title=$_POST[ 'title'];
$content=$_POST['content'];
if($_POST['submit']){
$sql="insert into message(id,user,title,content,lastdate )VALUES('','$user','$title','$content',now())";
mysql_query($sql);
echo "<seript>alert('提交成功') ;location.href='add.html';</seript>";
}
?>
亚连2018-06-11 09:24:28
echo "<seript>alert('提交成功');location.href='add.html';</seript>";你仔细看看这个语句有什么错误?