<?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-08-07 22:53:11
I'm not curious about anything else, I'm just curious about where your $id came from. Is there an id in the submitted $_POST array? It seems that I didn’t see
when I output it.亚连2018-06-11 09:24:28
echo "<seript>alert('Submission successful');location.href='add.html';</seript>"; Take a closer look at this statement to find any errors?