Using base64 encode and decode to store user data in database
| From: | Dotan Cohen | Date: | Fri, 19 Feb 2010 13:18:10 +0000 |
| Subject: | Using base64 encode and decode to store user data in database | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-302199@lists.php.net to get a copy of this message | ||
In order to prevent SQL injection, can one simply base64 encode the
data and store that? Then it can be decoded when I need to display it
on a website. I understand that this means that the data will not be
searchable, and that I still must sanitize it before printing it on
the site. Are there any other drawbacks or things to be aware of?
Thanks.
--
Dotan Cohen
http://what-is-what.com
http://gibberish.co.il
Please CC me if you want to be sure that I read your message. I do not
read all list mail.