sql - escaping characters

cfleck

tired
i've got a lovely little script that shoves web form data into a database. i'm new to the database game so i'm looking for a little help.

it works fine except if someone has a ' in there input. how do i "escape" that character? right now i just remove it, but i'd like to be able to keep it in there.

i googled for it and found nothing that made sense to me. any help?
 
Try a backslash followed by that character like: \\'
I've done this with double quote characters: " becomes \"

I fired up Dreamweaver and used Insert Special character, there are some variations to single quotes, but as far as HTML is concerned you could do any of:

´

‘

’
 
Back
Top