时间:2021-07-01 10:21:17 帮助过:5人阅读
$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());
}
这块怎么能实现需求呢?谢谢了!
//echo "";
//echo "提交成功 3秒后自动跳转";
// echo "若没自动跳转,请点击这里返回";
//header("Refresh:5;url=http://www.baidu.com");
mysql_close($con);
?>