欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

运用INSERT INTO语句向数据库中插入数据失败。

程序员文章站 2022-06-11 16:32:23
...
include(conn/conn.php);
if($_POST[submit]){
$code = $_POST['code'];
$note = $_POST['note'];
$routeway = $_POST['routeway'];
$operator = $_POST['operator'];
if($code!= "" || $note != "" || $routeway != "" || $operator !=""){
$sql ="INSERT INTO code_group (groupNumber,groupCode,groupNote,groupRouteway,groupOperator) VALUES('','$code','$note','$routeway','$operator')";
if(mysql_query($sql)){
echo"";
}else{
echo"";
}
}else{
echo"";
}
}
?>