That looks right. Took example from PHP MySQL Where Clause and edited a few things.Code:<?php $con = mysql_connect("localhost","peter","abc123"); $username = "riddle"; $password = "1234"; if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("my_db", $con); $result = mysql_query("SELECT * FROM AccountsTable WHERE username=" . $username); while($row = mysql_fetch_array($result)) { if (row['password'] == $password) echo "Correct password!"; } mysql_close($con); ?>
Results 1 to 7 of 7
Thread: [Mysql] Help
Threaded View
- 14 Jun. 2010 02:18pm #4