日期:2014-05-17 浏览次数:20439 次
<?php if(isset($_POST['submit'])){ $subjects_sql = "insert into subjects (`subjects_01`,`subjects_02`,`subjects_03`,`subjects_04`,`subjects_05`,`subjects_06`,`subjects_07`,`subjects_08`,`subjects_09`,`subjects_10`,`subjects_11`,`subjects_12`,`subjects_13`,`subjects_14`,`subjects_15`,`subjects_16`,`subjects_17`,`subjects_18`,`subjects_19`,`subjects_20`) values('$_POST[subjects_01]','$_POST[subjects_02]','$_POST[subjects_03]','$_POST[subjects_04]','$_POST[subjects_05]','$_POST[subjects_06]','$_POST[subjects_07]','$_POST[subjects_08]','$_POST[subjects_09]','$_POST[subjects_10]','$_POST[subjects_11]','$_POST[subjects_12]','$_POST[subjects_13]','$_POST[subjects_14]','$_POST[subjects_15]','$_POST[subjects_16]','$_POST[subjects_17]','$_POST[subjects_18]','$_POST[subjects_19]','$_POST[subjects_20]')"; $class_sql = "insert into class (`class_01`,`class_02`,`class_03`,`class_04`,`class_05`,`class_06`,`class_07`,`class_08`,`class_09`,`class_10`,`class_11`,`class_12`,`class_13`,`class_14`,`class_15`,`class_16`) values('$_POST[class_01]','$_POST[class_02]','$_POST[class_03]','$_POST[class_04]','$_POST[class_05]','$_POST[class_06]','$_POST[class_07]','$_POST[class_08]','$_POST[class_09]','$_POST[class_10]','$_POST[class_11]','$_POST[class_12]','$_POST[class_13]','$_POST[class_14]','$_POST[class_15]','$_POST[class_16]')"; if(mysql_query($subjects_sql) and mysql_query($class_sql)){ echo "<script>alert('提交成功');location.href='index.php';</script>"; }else{ echo "<script>alert('提交失败');location.href='index.php';</script>"; } } ?>