PHP form jumps to preserve data

Source: Internet
Author: User
Tags php form
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.
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.