use mysql_real_escape_string bastien > Date: Fri, 14 Dec 2007 08:40:47 -0600> From: awilliam@xxxxxxxxxxxxxxxx> To: php-general@xxxxxxxxxxxxx> Subject: how to handle inserting special characters into a mysql field> > I'm going to be inserting data from a PHP form into a mysql field. The > data could contain special characters like < > ' " \ /, etc. How do I > handle that? just $data = addslashes(htmlspecialchars($data)); before > the insert query? because later on the data will be read back from the > mysql db and I don't want it to contain a special character that would > break the PHP script.> > -- > PHP General Mailing List (http://www.php.net/)> To unsubscribe, visit: http://www.php.net/unsub.php> _________________________________________________________________ Introducing the City @ Live! Take a tour! http://getyourliveid.ca/?icid=LIVEIDENCA006