I have wrote a PHP script to handle user login. To prevent SQL Injection attack, I have used 'mysql_real_escape_string' function. Everything works good till today. I have traced code and finding the problem; the line using 'mysql_real_escape_string'. I have change it to basic command following:
$username=mysql_real_escape_string('sample');
var_dump($username)
The output is:
bool(false)
On my local web server (WAMP) everything is ok, but on remote host the problem appears! What is wrong? (Host PHP is 5.4.12)