求大神相助,谢谢!!
<br><?php<br><br><br>require_once("conn.php");<br><br>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)){<br>echo "添加成功!";<br>}<br> else{<br> echo '添加失败!';<br>}<br><br><br>?><br><br>报错 :
notice: undefined variable
warning: mysql_query() expects parameter 2 to be resource, null given in
------解决思路----------------------
$conn 变量未定义
请检查 conn.php 文件定义及加载情况










