RE: [PHP] Filtering out \ when a ' is user entered?
| From: | Jason Murray | Date: | Thu, 28 Jun 2001 00:27:02 +0000 |
| Subject: | RE: [PHP] Filtering out \ when a ' is user entered? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-55439@lists.php.net to get a copy of this message | ||
More to the point, if $input is your variable:
<?
if (get_magic_quotes_gpc())
{
$input = stripslashes($input);
}
?>
--
Jason Murray
jasonm@melbourneit.com.au
Web Developer, Melbourne IT
"Work now, freak later!"
> -----Original Message-----
> From: Jamie Thompson [mailto:jamie@tempoweb.com]
> Sent: Wednesday, June 27, 2001 10:58 PM
> To: Marcus James Christian; php-general@lists.php.net
> Subject: RE: [PHP] Filtering out \ when a ' is user entered?
>
>
>
> use the str_replace() function
> http://www.php.net/manual/en/function.str-replace.php
>
>
> -----Original Message-----
> From: Marcus James Christian [mailto:marcus@mjchristianunlimited.com]
> Sent: 27 June 2001 05:19
> To: php-general@lists.php.net
> Subject: [PHP] Filtering out \ when a ' is user entered?
>
>
> Hello,
>
> I'm pretty new to PHP but all I've seen of it so far I pretty
> much love!
>
> I've built a web log but when the user enters their data and
> they use '
> or " (and you know they will) php always shows it from the included
> web log as
>
> \' How can I filter out these backslashes so they don't appear on the
> final public viewable page?
>
> Thanks,
> Marcus
>
> --
> Marcus James Christian - UNLIMITED -
> Multimedia Internet Design
> http://mjchristianunlimited.com
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail:
> php-list-admin@lists.php.net
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail:
> php-list-admin@lists.php.net
>