Which query is more EXTRA secure?
I have even heard salt(); and md5(); in php5 would been extra secure for mySQL insertion.
$customers_email = mysql_real_escape_string(trim(strtolower($_REQUEST['customers_email'])));
$customers_email = mysql_real_escape_string(($_REQUEST['customers_email']));
Or even this, I thought of:
$1=$_REQUEST['customers_email'];
$2=$1;
$3=$2;
$4=$3;
$5=$4;
$a=$5;
$xx = mysql_real_escape_string(($a));
My original thread: https://stackoverflow.com/questions/7633993/php-mysql-select-how-to-make-it-secure
None of your queries are more secure than the other. One of them converts the string to all lowercase and trims whitespace. This doesn’t do anything to prevent a SQL injection. Your last query is the same as a plain
mysql_real_escape_string($_REQUEST['customers_email']);.