I have this piece of PHP, I just wanna make sure it's safe from SQL injection and security vulnerabilities:
<?php
require_once "./source/includes/data.php";
header('Content-type: application/json');
$request = mysql_real_escape_string($_REQUEST['email_address']);
$query = mysql_query("SELECT * FROM mmh_user_info WHERE email_address ='$request'");
$result = mysql_num_rows($query);
if ($result == 0){
$valid = 'true';}
else{
$valid = 'false';
}
echo $valid;
?>
I'm still a php newbie, any enhancements or edits would be greatly appreciated!