RE: [PHP] inserting ´ in a db

From: Date: Thu, 04 Oct 2007 02:48:21 +0000
Subject: RE: [PHP] inserting ´ in a db
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-262727@lists.php.net to get a copy of this message
There are any number of elements to try htmlspecialchars mysql_real_escape_string addslashes RTFM and see what works best for your situation bastien> From: jiuman@gmail.com> To: php-general@lists.php.net> Date: Thu, 4 Oct 2007 bastien> 11:44:34 +0900> Subject: [PHP] inserting ´ in a db> > Hi list, good day.> > > bastien> > I have a simple script that inserts text on a mysql table, that has a field> named bastien> description and the type is text.> > Everting works fine, except when I try to insert a text bastien> that includes a> simple quote. > > For example > > > > Yamil´s car> > bastien> > > I send the character string to a variable and then insert into a query. But> the mysql bastien> says that something is wrong with the query because the quote> after the l looks like the end of bastien> the string, and “s car” doesn`t look like> a valid part of the query.> > > > Can bastien> anyone help me out, how to handle this error?> > > > Thanks> > Yamil> _________________________________________________________________ Show your pals how you really feel! Learn more today! http://www.freemessengeremoticons.ca/

« previous php.general (#262727) next »