bcamp1973 Posted February 8, 2007 Share Posted February 8, 2007 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 Quote Link to comment https://forums.phpfreaks.com/topic/37667-solved-mysql_real_escape_string-not-php-4310-compatible/ Share on other sites More sharing options...
effigy Posted February 8, 2007 Share Posted February 8, 2007 Apparently 4.3.10 requires the link: string mysql_real_escape_string ( string unescaped_string [, resource link_identifier] ) Quote Link to comment https://forums.phpfreaks.com/topic/37667-solved-mysql_real_escape_string-not-php-4310-compatible/#findComment-180164 Share on other sites More sharing options...
bcamp1973 Posted February 8, 2007 Author Share Posted February 8, 2007 argh! you are correct. thank you! Quote Link to comment https://forums.phpfreaks.com/topic/37667-solved-mysql_real_escape_string-not-php-4310-compatible/#findComment-180168 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.