Why can't I find the id and alert statements when I submit a message using notepid++?
微蕤轻凉
微蕤轻凉 2018-06-10 22:43:54
0
3
1192

<?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>";

}

?>


微蕤轻凉
微蕤轻凉

reply all(3)
浮云

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.
亚连

It's not<seript>, it's<script>

亚连

echo "<seript>alert('Submission successful');location.href='add.html';</seript>"; Take a closer look at this statement to find any errors?

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!