I would like to start my question by saying, I realize PDO/mysqli is the new standard and has been widely covered on SO. However in this particular case I dont have time to convert all queries to PDO before launching the clients site.
The following has been used throughout most of the queries on the site (not by me may I add)
$userEmail = filter_var($_POST['fEmail'], FILTER_SANITIZE_EMAIL);
$userEmail = mysql_real_escape_string($userEmail);
$sql ="SELECT email FROM members WHERE email = '$userEmail'";
:
:
I would like to know:
Is it good / okay practise to use filter_var
and mysql_real_escape_string
together as in the example above? My main concern is, can these two functions be used together or cause some sort of conflict / bug when executing / uploading to DB?
Also is there any sort of benefit in using both?
Thanks in advance