我正在写一个程序,应该连接到我的网站上的php文件。在C#中,他们输入一个值(密码)。然后密码将被发送到网页(example.com/example.php?param=<password>)
我知道如何让程序发送密码,但我不知道如何将输入的值与mysql数据库表中的值进行比较。如果值在数据库中,我希望它返回true。
发布于 2012-08-23 04:04:36
sql
SELECT `password`
FROM `tableName`
WHERE `password` = :password:password应该是您在数据库中检查的值
发布于 2012-08-23 04:05:16
select 1 from your_table where password = 'thepass'发布于 2012-08-23 18:13:02
$result = mysql_query("SELECT * FROM table1 where password = '$password'", $link);
$num_rows = mysql_num_rows($result);
if($num_rows >0)
return true;
return false;https://stackoverflow.com/questions/12080502
复制相似问题