select * from phone where `p_moshi`=CDMA2000Warning: mysql_result() expects parameter 1 to be resource, boolean given in D:\Program Files\Apache\htdocs\htc\tp.php on line 169Warning: mysql_fetch_row() expects parameter 1 to be resource, boolean given in D:\Program Files\Apache\htdocs\htc\tp.php on line 203我用这个句子直接在数据库查询是报错的 加了但引号之后没事了 但是在php语句中要怎么写啊 我加了但引号 但是php不解析
$sql.=" where `p_moshi`='$moshi'"; //字符串格式都要这样写
我在页面输出了句子 就是这个样子 没解析 要是这样歇的话mysql就必须解析掉这个变量
只能获取到表单元素的值吧! img也能这样?
什么没解析。mysql_query($sql) or die(mysql_error); //这样提示什么错误
不清楚啊, img标签不属于表单的东西吧 就像在form里放一个<h1 name="yy">, 没理由提交吧。。
楼主可以加一个<input type="hidden" name="yy"/>,这样服务端就可以根据yy判断是不是用户提交了表单,没记错就是这么写。。
select * from phone where `p_moshi`=CDMA2000Warning: mysql_result() expects parameter 1 to be resource, boolean given in D:\Program Files\Apache\htdocs\htc\tp.php on line 169Warning: mysql_fetch_row() expects parameter 1 to be resource, boolean given in D:\Program Files\Apache\htdocs\htc\tp.php on line 203我用这个句子直接在数据库查询是报错的 加了但引号之后没事了
但是在php语句中要怎么写啊 我加了但引号 但是php不解析
img也能这样?
<form action="tp.php" method="post">文本框传值