当前位置:Gxlcms > PHP教程 > 求大神相助,多谢!

求大神相助,多谢!

时间:2021-07-01 10:21:17 帮助过:3人阅读

求大神相助,谢谢!!



require_once("conn.php");

if(mysql_query("insert into name set name='$name',tel='$tel',email='$email',QQ='$QQ',sex='$sex',brandname='$brandname',commoditybrand='$commoditybrand',productID='$productID',ordername='$ordername',shopname='$shopname',shopaddr='$shopaddr',invoicenumber='$invoicenumber',purchasingdate='$purchasingdate'",$conn)){
echo "添加成功!";
}
else{
echo '添加失败!';
}


?>



报错 :
Notice: Undefined variable

Warning: mysql_query() expects parameter 2 to be resource, null given in
------解决思路----------------------
$conn 变量未定义
请检查 conn.php 文件定义及加载情况

人气教程排行