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 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] ) 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! 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
Archived
This topic is now archived and is closed to further replies.