Re: stripslashes()
| From: | Dade Register | Date: | Sun, 02 Mar 2003 01:05:31 +0000 |
| Subject: | Re: stripslashes() | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-137736@lists.php.net to get a copy of this message | ||
Well, only diff is it's a POST from a textarea. With
magicquotes on, you're right, it makes "Thank's"
become "Thank\'s". how can I get rid of that? I'm
posting it to a text file.
-Dade
--- Ernest E Vogelsinger <ernest@vogelsinger.at>
wrote:
> At 01:48 02.03.2003, Dade Register said:
> --------------------[snip]--------------------
> >I know this is probably an easy question, but I am
> >using stripslashes() on a textarea var, and I don't
> >think it's working. It doesn't error, but in the
> >testarea it doesn't seem to work. Ex:
> >
> >$var = "Thank's";
> >$var = stripslashes($var);
> >echo $var;
> >Output = Thank\'s
> --------------------[snip]--------------------
>
> This can't work since there are no slashes to
> strip...
>
> stripslashes() strips certain slashes from a string.
> Assume you have a
> textarea where the user enters "Thank's", so PHP
> converts this to
> "Thank\'s" (assuming magic_quotes is set to on).
> Using stripslashes() here
> will get rid of these slashes.
>
> BTW - the sample you've sent will output "Thank's" -
> what are you doing
> what you didn't show?
>
>
> --
> >O Ernest E. Vogelsinger
> (\) ICQ #13394035
> ^ http://www.vogelsinger.at/
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/