insert statment with variables after where clause

rwahdan

New member
Hi

I am having a problem with this code:

$sqlSelect = "SELECT * FROM login_users where username_email= $user_email";
$result = mysqli_query($conn,$sqlSelect);

the error is:

Fatal error: Uncaught mysqli_sql_exception: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '@gmail.com' at line 1...

how to get if the email exists in the db table?
 
Back
Top