Help php form redirect retain data help & nbsp; hope to click the submit button, the form data is retained and a new window does not pop up & nbsp; how to implement it? The code is as follows: login.html & lt; form & nbsp; nameloginform & nbsp; actionlogin. php & nbsp; methodpost & nbsp; onSub asks for php form redirection to retain data
For help, I hope that after clicking the submit button, how can I keep the form data and do not bring up a new window?
The code is as follows:
Login.html
Record. php
$ Con = mysql_connect ("localhost", "root", "w123456 ");
If (! $ Con)
{
Die ('could not connect: '. mysql_error ());
}
Mysql_select_db ("peixunrecord", $ con );
Mysql_query ("set names 'utf8 '");
$ Bumen = $ _ POST ['bumen'];
$ Keduimokuai =$ _ POST ['keduimokuai'];
$ Xingming = $ _ POST ['xingming'];
$ Peixunshijian =$ _ POST ['peixunshijian '];
$ Keti = $ _ POST ['keti'];
$ Xinde = $ _ POST ['xinde'];
$ SQL = "INSERT INTO record (bumen, keduimokuai, xingming, peixunshijian, keti, xinde) VALUES ('$ bumen', '$ keduimokuai', '$ xingming ', '$ peixunshijian', '$ keti',' $ xinde ')";
If (! Mysql_query ($ SQL, $ con ))
{
Die ('Error: '. mysql_error ());
}
How can we achieve this? Thank you!
// Echo "script" alert ('submission successful! '); Location. href =' ". $ _ SERVER [" HTTP_REFERER "]." '; script ";
// Echo "automatically jump 3 seconds after submission successful ";
// Echo "if automatic jump is not performed, click here to return ";
// Headers ("Refresh: 5; url = http://www.baidu.com ");
Mysql_close ($ con );
?>
------ Solution ----------------------
Iframe or ajax submit a form...