mysql - Problem with PHP mysql_real_escape_string -


when run mysql_real_escape_string , example this:

$test = mysql_real_escape_string($_post['test']); 

it's not working on local server, gives me error page!

  • my local server "appserv".
  • my operating systim "windows xp".

is normal ? , have run on hosted site !

you have provide function active database connection. think it's second argument:

$test = mysql_real_escape_string($_post['test'], $mysql_database_connection); 

that might error, because if don't provide active connection explicitly, function looks last 1 created. if run function before connecting database, it'll give error.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -