Re: [PHP] Using base64 encode and decode to store user data in database

2010-02-19 Thread Ashley Sheridan
On Fri, 2010-02-19 at 15:18 +0200, Dotan Cohen wrote: 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

Re: [PHP] Using base64 encode and decode to store user data in database

2010-02-19 Thread tedd
At 3:18 PM +0200 2/19/10, Dotan Cohen wrote: 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

Re: [PHP] Using base64 encode and decode to store user data in database

2010-02-19 Thread Andrew Ballard
On Fri, Feb 19, 2010 at 8:18 AM, Dotan Cohen dotanco...@gmail.com wrote: 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,

Re: [PHP] Using base64 encode and decode to store user data in database

2010-02-19 Thread Dotan Cohen
On 19 February 2010 16:27, tedd tedd.sperl...@gmail.com wrote: At 3:18 PM +0200 2/19/10, Dotan Cohen wrote: 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

Re: [PHP] Using base64 encode and decode to store user data in database

2010-02-19 Thread Dotan Cohen
One would be storage space, as base64 requires more space to store the same data. For a single data element that might not be much, but when multiplied over all the values stored in your table it makes a difference. That is a good point, thanks. Also, don't forget to validate/filter

Re: [PHP] Using base64 encode and decode to store user data in database

2010-02-19 Thread Paul M Foster
On Fri, Feb 19, 2010 at 05:43:15PM +0200, Dotan Cohen wrote: snip They don't ship to Israel! I have looked for it locally, but not found it. I'm sure that I could acquire a copy on some p2p service but I really don't like doing that. Maybe I could Paypal $20 to Chris himself if that

Re: [PHP] Using base64 encode and decode to store user data in database

2010-02-19 Thread Teus Benschop
On Fri, 2010-02-19 at 11:45 -0500, Paul M Foster wrote: On Fri, Feb 19, 2010 at 05:43:15PM +0200, Dotan Cohen wrote: They don't ship to Israel! I have looked for it locally, but not found it. I'm sure that I could acquire a copy on some p2p service but I really don't like doing that. Maybe

Re: [PHP] Using base64 encode and decode to store user data in database

2010-02-19 Thread tedd
At 5:43 PM +0200 2/19/10, Dotan Cohen wrote: On 19 February 2010 16:27, tedd tedd.sperl...@gmail.com wrote: An excellent book on this (and much more) is Chris Shiflett's Essential PHP Security. You can pick it up on Amazon for less than $20 -- well worth the cost. They don't ship to

Re: [PHP] Using base64 encode and decode to store user data in database

2010-02-19 Thread Dotan Cohen
What about eBook ($23.99)? http://oreilly.com/catalog/9780596006563 If you can get this, you can get that. That may be a good idea. Certainly better than the pirate bay. -- Dotan Cohen http://what-is-what.com http://gibberish.co.il Please CC me if you want to be sure that I read your