If (isset ($ _ POST ['submit ']) cannot be executed & lt; formname = & quot; adduser & quot; action = & quot; dealadduser. php & quot; method = & quot; POST & quot; & gt; if (isset ($ _ POST ['submit ']) cannot be executed
If (isset ($ _ POST ['submit '])
{
Mysql_connect ("localhost", "root ","");
Mysql_select_db ("soft ");
Mysql_query ("set character set gbk ");
$ Username = $ _ POST ["username"];
$ Password = $ _ POST ["password"];
$ SQL = "insert into 'Users' ('name', 'pass') values ('$ username',' $ password ')";
Echo $ SQL;
Mysql_query ($ SQL );
Mysql_close ();
}
?>
I cannot write data to the database until I click submit. if (isset ($ _ POST ['submit ']) is not executed at all? Tutorial
------ Solution --------------------
It's okay to test your code, unless this page is not dealadduser. php
PHP code
------ Solution --------------------
Isn't your current page dealadduser. php?
If not, the dealadduser. php page should be
PHP code