Re: Sterilize user input function
| From: | Sean C. McCarthy | Date: | Sun, 09 Sep 2001 11:31:31 +0000 |
| Subject: | Re: Sterilize user input function | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-66596@lists.php.net to get a copy of this message | ||
Hi,
You might want to have a look at
http://www.thewebmasters.net/php/Validator.phtml
is a class for
validating serveral things. It is a PHP class. You can have a look at
the regexps they have used. But as stated before it would be better to
check the syntax instead... if it is not a phone number just do not
accept it and require the user to enter it again.
Sean C. McCarhy
SCI, S.L. (www.sci-spain.com)
Christian Reiniger wrote:
>
> On Sunday 09 September 2001 04:46, Kevin wrote:
> > I think my question could be restated to: What characters are
> > potentially lethal in user input. I can do the regex. But don't know
> > what to parse out of the strings.
> >
> > would removing \ / . do the trick?
>
> You mean http://php.net/addslashes I suppose. Also read through
> the
> config section (magic_quotes_*)
>
> --
> Christian Reiniger
> LGDC Webmaster (http://lgdc.sunsite.dk/)
>
> The most exciting phrase to hear in science, the one that heralds new
> discoveries, is not "Eureka", but "That's funny..."
>
> - Isaac Asimov
>
> --
> 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