mysql_real_escape_string making variable equal nothing

Posted on 16th Feb 2014 by admin

i post a form and i post the variable:
Code: $var = $_POST[variable];then i echo $var its what i submitted the variable to be.
then i add the mysql_real_escape_string() function to it
spell it correctly too
Code: $var = mysql_real_escape_string($_POST[variable]);then i echo the variable it equals nothing?
why?
is it because i havent added a mysql query on yet or what?

Other forums