Forum Moderators: coopster

Message Too Old, No Replies

Entering quotes in textfields

         

RussellC

5:16 pm on Feb 7, 2003 (gmt 0)

10+ Year Member



I just had a user enter something with single quotes in a text field, which then screwed everything up cause it was trying to insert that into mysql. How can I make it add slashes or something so this wont happen again? Thanks.

RussellC

5:27 pm on Feb 7, 2003 (gmt 0)

10+ Year Member



Update: I have magic_quotes_gpc turned on. This only caused problems when I have a text field with text with quotes in one table, and then that field gets stored in a variable and then that variable gets INSERTed into another table.

jarboy

5:35 pm on Feb 7, 2003 (gmt 0)

10+ Year Member



Add slashes before sending to dB table:

[php.net...]

RussellC

5:42 pm on Feb 7, 2003 (gmt 0)

10+ Year Member



worked...thanks a bunch