PHP mysql_real_escape_string() returning `NULL` -


I am using PHP version 5.1.6 and from my $ _ GET array is returning to NULL after avoiding my script.

It looks like mysql_escape_string () works fine, but it dislikes, so I do not want to use it. After checking on

phpinfo () , what I can see in MySQL Lib is loaded properly. Has anyone experienced this kind of before?

  $ word = $ _GET ['q']; Var_dump ($ period); // string (7) "Richard" echo "
"; $ Sterm = mysql_real_escape_string ($ word, $ db); Var_dump ($ sterm); // NULL

This is very strange for me, I can not imagine why this function will not work.

Are you sure you have a MySQL connection running?

Note : > MySQL connection
, And FALSE returns if the $ link_identifier is not defined, the previous MySQL connection is used.


Comments