【wamp】php链接MySQL
PHP中文网
PHP中文网 2017-04-10 15:56:02
0
1
401
<?php
$un=$_POST["userName"];
$pw=$_POST["passWord"];
$con=mysql_connect("localhost","root","");
mysql_select_db("szzoo");
$result=mysql_query("select passWord from login
					where userName=$un;"
);
 die(mysql_error());
if (mysql_result($result,0)==$pw)
{
	echo "sucess";
}
else
{
	echo "wrong";
}
mysql_close($con);
?>

Champ 'szzoo' inconnu dans where clause
我的MySQL里有szzoo库,其中也有login表
求大神帮忙啊。。。。

PHP中文网
PHP中文网

认证高级PHP讲师

reply all(1)
左手右手慢动作

$result=mysql_query("select passWord from login where userName='".$un."'");

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template