Re: Re: test for illegal characters and consequences
| From: | Eduardo Raúl Galván Sánchez | Date: | Thu, 01 Jan 1970 00:00:00 +0000 |
| Subject: | Re: Re: test for illegal characters and consequences | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-233222@lists.php.net to get a copy of this message | ||
You can compare each character against the "standard character set" by means of regular expressions.
Angelo Zanetti escribió:
Al wrote:Angelo Zanetti wrote:Well any kind of character that could break the the site and the SQL statement. Its not really important what the characters are inputted but rather how to remedy the situation once these characters have been entered. ThanksHi guys. Ive developed a site and now I've come to the stage where I need to test each textfield on each form for illegal characters that have been inputted. I would like to know from some of you how you go about it? Do you use a regular expression and test each textfield sequencially, also what do you do when you find illegal characters? do you strip them out of the inputted information or do you post an error message and tell them that there are illegal characters? I have many pages and many textfields so I would like to use the best and most appropriate and time effective approach by taking in your suggestions before doing the testing and counter measure. Thanks in advanceBe more specific about what you mean by "illegal" characters. Give us some examples.