| <?php 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']); } ?> |