Re: Storing encrypted data in a database with
| From: | John W. Holmes | Date: | Tue, 23 Mar 2004 22:30:38 +0000 |
| Subject: | Re: Storing encrypted data in a database with | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-181324@lists.php.net to get a copy of this message | ||
Jay Blanchard wrote:
You have an error in your SQL syntax near 'HX‹ýÚÈppT Äþì7 GH©ŽŒÕõý' ) ' at line 1 Now, if you look closely you can see and additional single quote in êR'—HX‹. I cannot use addslashes() here can I? Or should I base64_encode each item and then decode on the way back out. Any thoughts would be appreciated.Yes, you still need to use addslashes() or mysql_escape_string() on the encrypted data string. It will not mess up the encryption. Encrypted or not, it's still a string and special characters need to be escaped. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com