I am trying to query the db in php and get if there is a match / success but it’s not resulting in success although it should so I’ve thinking there’s a syntax error?
Here is the code:
if ($db_found) {
$SQL = "SELECT * FROM wp_users where user_login='.$user.'";
$result = mysql_query($SQL);
//Check if theres a match
if $result > 0 {
echo 'There was a match';
}
...
}
1 Answer