Re: adding Carrol O'Conner in a form
| From: | Angela Meehan | Date: | Mon, 02 Jul 2001 14:57:59 +0000 |
| Subject: | Re: adding Carrol O'Conner in a form | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-10023@lists.php.net to get a copy of this message | ||
This is automatically done by something called MagicQuotes. You can
turn this off in your installation of PHP.
-Angela
>HI,
>IF i add my name as Carol O'Conner in a form and Echo (PHP 4.06 on win
95) it back I see
>
>Carol O\'Conner
>
>If I pass that name along to another page I'll see it as:
>
> Carol O\\\'Conner
>
>Even if I use : <?php echo(htmlspecialchars ($name, ENT_QUOTES)); ?>
>
>IF I enter my name as: Carol O'Conner <died>
>I'll see it echoed as
>
>Carol O\'Conner <died>
>
>so I am thrilled that the <> came back and was displayed as it was
typed in by the user
>
>but how do I get rid of that pesky slash \ ?
>
>so I can echo exactly what the user typed in?
>
>I am already using:
>
> <?php echo(htmlspecialchars ($name, ENT_QUOTES)); ?>
>
>Thanks for the help,
>
>ken