Home  >  Article  >  Backend Development  >  求大神相助,多谢!

求大神相助,多谢!

WBOY
WBOYOriginal
2016-06-13 12:12:011419browse

求大神相助,谢谢!!

<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 文件定义及加载情况

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn