cgchris99 Posted March 17, 2008 Share Posted March 17, 2008 I have an event database. Some of the club names have an apostrophe in them. When I have them search for events based on club name, or even logging in can be a problem. The apostrophe causes me problems. The insert is creating an error because of this. What can I do to allow them to have these apostrophe's in the name and still have search routines work properly? Thanks for any advice Link to comment https://forums.phpfreaks.com/topic/96548-apostrophe-screws-up-phpmysql-code/ Share on other sites More sharing options...
craygo Posted March 17, 2008 Share Posted March 17, 2008 1 of 2 functions you need to use to fix this addslashes() or mysql_real_escape_string() These will add slashes to characters that would cause problems in queries and such. Ray Link to comment https://forums.phpfreaks.com/topic/96548-apostrophe-screws-up-phpmysql-code/#findComment-494082 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.