Trouble with apostrophes in names
Posted: Mon May 17, 2010 8:08 am
I'm having problems storing names such as O ' Toole.
[*]On the 1st page the user inputs surname i.e. O ' Toole. The data is passed through to the next page (POST) as O\ ' Toole. If I just insert the data it is stored on the database as O'Toole. If I use mysql_real_escape_string() it gets stored on the database as O\' Toole. Which is the correct database storage format - should it be O\' Toole or O ' 'Toole ?
Appreciate if you can help (I've added extra spaces to show up the ')
Jackie
[*]On the 1st page the user inputs surname i.e. O ' Toole. The data is passed through to the next page (POST) as O\ ' Toole. If I just insert the data it is stored on the database as O'Toole. If I use mysql_real_escape_string() it gets stored on the database as O\' Toole. Which is the correct database storage format - should it be O\' Toole or O ' 'Toole ?
Appreciate if you can help (I've added extra spaces to show up the ')
Jackie