I wrote a small program with the $ _ POST variable but encountered a problem when the $ _ POST variable was used. First: $ _ POST [& quot; submit & quot;] does not seem to work. if you click it, the system does not respond. Second: $ _ POST [& quot; user & quot;], $ _ POST [& quot; use the $ _ POST variable for title & qu
I wrote a small program, but there was a problem when I used the $ _ POST variable.
First, $ _ POST ["submit"] does not seem to work. after clicking it, the system does not respond.
Second: $ _ POST ["user"], $ _ POST ["title"], $ _ POST ["content"] will report an error. you must increase the brackets, I don't understand why, for example, {$ _ POST ["user"]}, {$ _ POST ["title"]}, {$ _ POST ["content.
Which of the following can help you take a look.
Include ("conn. php ");
If ($ _ POST ["submit"])
{
$ SQL = "INSERT INTO message (id, user, title, content, lastdate )".
"Values ('', {$ _ POST ["user"] },{$ _ POST ["title"] },{$ _ POST ["content"]}, now ())";
Echo "Success ";
$ Result = @ mysql_query ($ SQL, $ conn) or die (mysql_error ());
}
?>
------ Solution --------------------
HTML code