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