Re: another dumb newbie question - backslash before single quote

From: Date: Mon, 15 Jan 2001 21:09:27 +0000
Subject: Re: another dumb newbie question - backslash before single quote
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-5885@lists.php.net to get a copy of this message
store the value in a named variable, then call the variable with the stripslashes() function before inserting it into the DB. a la: $event = "St. Patrick's Day"; $event = stripslashes($event); insert table values('$event'); .... At 02:13 PM 1/15/2001 -0500, Timothy Wright wrote:
Hello - I have set up a calendar database with MySQL and PHP that uses simple text and tinytext fields for events and event descriptions. The problem is, whenever I enter an event that uses an apostrophe ( St. Patrick's Day) or a description (4 o'clock) it stores and returns ( St. Patrick\'s Day) from the database. Any suggestions? Thanks in advance, Tim Wright :::::::::::::::::::::::::::::::::::::::::::
:::                                     :::
:::   Timothy Wright                    :::
::: mailto:tim.wright@01network.com :::
:::   Digital Network Enterprises       :::
:::   http://www.01network.com          :::
:::                                     :::
:::   secure e-mail by request          :::
::: (PGP signature and/or encryption) ::: ::::::::::::::::::::::::::::::::::::::::::: -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net For additional commands, e-mail: php-db-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net
Kevin McCarthy Body & Soul http://www.bodynsoul.com

« previous php.db (#5885) next »