I am a little confused about how $query
works and how I can find a value... Say I have a checkuser.php
script. The purpose here is to echo
"Correct" if the user already exists. I have the columns (username, password, email). What I want to know is how can I search the column username
for value $username
? This is what I have currently:
$query = sprintf("SELECT * FROM users WHERE CONCAT(username) LIKE '$u'");
$result = mysql_query($query);
if(mysql_num_rows($result) != 1)
echo "Username Not Found";
Thanks!