Re: test for illegal characters and consequences
| From: | Paul Scott | Date: | Wed, 05 Apr 2006 11:28:42 +0000 |
| Subject: | Re: test for illegal characters and consequences | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-233242@lists.php.net to get a copy of this message | ||
On Wed, 2006-04-05 at 13:34 -0800, Angelo Zanetti wrote:
> Thanks for the reply. So what do you do if someone enters illegal characters in one of your
> form? Do you inform the user and prompt them to enter the fields again or do you just strip out all
> the bad
> characters and enter the rest of the info into the database?
>
> Im concerned with what to do once a user has added the bad characters. I will be using a
> regular expression.
>
depends on what "illegal characters" are...
If I want a name, I will discard anything other than text for instance.
Send an error message to the user and get them to refill the input box.
Not sure what the question is?
--Paul