Help PHP form jump to preserve data
If you want to be able to click the Submit button, the form data is retained and does not pop up new window How to implement AH?
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 this piece of demand be fulfilled? Thanks, man.
echo "";
echo "Automatic jump after 3 seconds of submission";
echo "If not automatically jump, please click here to return";
Header ("refresh:5;url=http://www.baidu.com");
Mysql_close ($con);
?>
------to solve the idea----------------------
IFrame or Ajax submit a form you're a mom.