worldcomingtoanend Posted February 10, 2010 Share Posted February 10, 2010 an example is below. I have tried to google but there seems not to be much on PHP ODBC especially on sql injections. Will appreciate your help. $username=mysql_real_escape_string($username); $password=mysql_real_escape_string($password); Quote Link to comment https://forums.phpfreaks.com/topic/191586-how-do-i-write-mysql_real_escape_string-in-php-odbc/ Share on other sites More sharing options...
ignace Posted February 10, 2010 Share Posted February 10, 2010 You can't mysql_real_escape_string is mysql only. Use addslashes instead Quote Link to comment https://forums.phpfreaks.com/topic/191586-how-do-i-write-mysql_real_escape_string-in-php-odbc/#findComment-1010094 Share on other sites More sharing options...
worldcomingtoanend Posted February 10, 2010 Author Share Posted February 10, 2010 You can't mysql_real_escape_string is mysql only. Use addslashes instead so are saying i should do something like this: $username=addslashes($username); Quote Link to comment https://forums.phpfreaks.com/topic/191586-how-do-i-write-mysql_real_escape_string-in-php-odbc/#findComment-1010100 Share on other sites More sharing options...
ignace Posted February 10, 2010 Share Posted February 10, 2010 Yes Quote Link to comment https://forums.phpfreaks.com/topic/191586-how-do-i-write-mysql_real_escape_string-in-php-odbc/#findComment-1010132 Share on other sites More sharing options...
KevinM1 Posted February 10, 2010 Share Posted February 10, 2010 If ODBC's prepared statements work like other db's, use that instead. Quote Link to comment https://forums.phpfreaks.com/topic/191586-how-do-i-write-mysql_real_escape_string-in-php-odbc/#findComment-1010170 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.