Jump to content

[SOLVED] mysql_real_escape_string() not PHP 4.3.10 compatible?


bcamp1973

Recommended Posts

Hmm, this is working on my local install of PHP 4.4.4

 

function esc($data) {
global $dbc;
if(ini_get('magic_quotes_gpc')) $data=stripslashes($data);
return mysql_real_escape_string(trim($data),$dbc);
}

 

...but i get the following error on my ISP's PHP 4.3.10 install

 

Warning: mysql_real_escape_string() expects parameter 2 to be resource, null given in /path/to/functions.php on line 358

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.