Posted by ByteCoder on 09/28/72 11:37
Oli Filth <catch@olifilth.co.uk> wrote in
news:ezMyf.892$mf2.515@newsfe6-win.ntli.net:
> ByteCoder said the following on 16/01/2006 12:11:
>> Oli Filth <catch@olifilth.co.uk> wrote in
>> news:%BLyf.35809$W4.22578@newsfe4-gui.ntli.net:
>>
>>> Incidentally, why are you storing stuff in your databases in a way
>>> that requires stripslashes() to be called? Just store the raw text,
>>> don't apply addslashes() or whatever to it.
>>>
>>>
>>
>> Thanks for the awnser. I do the addslashes and stripslashes because I
>> want to prevent SQL injection attacks. (When inserting a value in a
>> DB that was entered by a visitor).
>
>
> addslashes() is not a fail-safe method for putting data into a MySQL
> database. Use mysql_real_escape_string(), which is designed for this
> purpose.
>
>
>
I see. Thanks! :)
--
----------------------------------
- ByteCoder -
- "Da Evul Dootchie" -
- Qnl0ZUNvZGVyQHBsYW5ldC5ubA== -
----------------------------------
Navigation:
[Reply to this message]
|