![]() |
Sanitizing Strings for MySQL?
Could you use addslashes and mysql_real_escape_string together to sanitize user input?
Example: Code:
<?php Thanks. :-) |
I would only use
mysql_real_escape_string. It works to clean up against SQL injections. |
So I would do it like this?
Example: Code:
<?php |
Indeed, that would be secure
|
Okay, thanks!
|
Yep. Don't use 2 similar functions with one another, sometimes it may have disastrous consequences.
|
| All times are GMT. The time now is 01:03 PM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0