I have an admin that inputs Busines Names, Descriptions, and Urls into a mysql db and then displays them on a website from that db.
Users 'usually' use (sorry) MS Word to copy and paste entries into the admin. They enter single quotes in their text and these are being display on the web as question marks " ? "
Code in place to escape these.
$ltitle = eregi_replace("'", "\'", $ltitle);
$lurl = eregi_replace("'", "\'", $lurl);
$ldesc = eregi_replace("'", "\'", $ldesc);
also tried addslashes().... all to no avail.
I.e. user enters : John's Pizza for '04
Displays as : John?s Pizza for ?04
Using stripslashes allows the records to display correctly, but I prefer to remove these before they go into the table.
Any help is greatly appreciated.