RE: [PHP] apostrophe ( ' ) on a form, adding \; How can i fix this?
| From: | Chris W. Parker | Date: | Thu, 26 Feb 2004 08:11:41 +0000 |
| Subject: | RE: [PHP] apostrophe ( ' ) on a form, adding \; How can i fix this? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-178914@lists.php.net to get a copy of this message | ||
as others have mentioned already, it's happening automatically because of the magic quotes
feature. use the function stripslashes() to remove the escaping character.
$text = "o\'reilly";
$text = stripslashes($text);
// $text now equals "o'reilly";
hth,
chris.
-----Original Message-----
From: Louie Miranda [mailto:louie@axishift.ath.cx]
Sent: Wed 2/25/2004 9:19 PM
To: php-general@lists.php.net
Cc:
Subject: [PHP] apostrophe ( ' ) on a form, adding \; How can i fix this?
I have a user/form that client enters data. And one of my clients have an
apostrophe on his name
eg: Ero's
Now, this page has a confirmation page that the client would see first
before his form will be directed into my system. Now its shows "Ero\'s" how
come this is happening? I dont have any filters for this?
Any help is much appreciated! Thank you!
-- -
Louie Miranda
http://www.axishift.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php