RE: [PHP-DB] Dealing with Quotation marks

From: Date: Fri, 08 Feb 2002 17:20:36 +0000
Subject: RE: [PHP-DB] Dealing with Quotation marks
Groups: php.db 
Request: Send a blank email to php-db+get-16703@lists.php.net to get a copy of this message
First, you don't have to write your own function to remove slashes. Simply use: $newline = stripslashes($oldline); Second, write your lien containing slashes to the database. When you pull it from the database, use stripslashes(). -----Original Message----- From: Gary [mailto:gcooke@radionics.com] Sent: Friday, February 08, 2002 10:35 AM To: php-db@lists.php.net Subject: [PHP-DB] Dealing with Quotation marks Does anyone know how to deal with this problem? If a user enters in a text box; O'Connor's 2" x 3" When you print it out on the next web page it reads; O\'Connor\'s 2\" x 3\" I have written a function to take care of this, but when you try to write it to the database you get an error of unmatched quotation marks. Is there a function to handle this? Any help would be appreciated. Thanks, Gary -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.db (#16703) next »