include("inc/connect.php"); //数据库连接
include("inc/base_function.php"); //这里有get_value函数
$buy =get_value('buy',post);
$month =get_value('month',post);
$day =get_value('day',post);
$time =get_value('time',post);
$sum =get_value('sum',post);
$name =get_value('name',post);
$sex =get_value('sex',post);
$mo =get_value('mo',post);
$caption=get_value('caption',post);
$dtime =$month.'月'.$day.'日'.$time.'时';
if( empty($name) || empty($sum) || empty($mo) ){
alert('对不起,请认真填写你的定餐信息,以及我们及时与您取得联系!','');
}else{
$sql="Insert into gx_buy(buy,sum,name,sex,caption,mdt,mo) value('$buy','$sum','$name','$sex','$caption','$dtime','$mo')";
mysql_query($sql) or die(mysql_error());
alert('恭喜你,定餐成功,我们会在最短的时间与您取得联系!',$_SERVER['HTTP_REFERER']);
}
?>
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号