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

求大神相助,多谢!

WBOY
Release: 2016-06-13 12:12:01
Original
1490 people have browsed it

求大神相助,谢谢!!

<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 />
Copy after login


报错 :
Notice: Undefined variable

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

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template