This is a discussion on validating user input: regex vs. filters? within the PHP Language forums, part of the PHP Programming Forums category; I have decided that Since I have to update the processing on many of my forms, I'm going to ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I have decided that Since I have to update the processing on many of my
forms, I'm going to start them all over from scratch. Before I begin I thought I'd solicit comments on using the PHP regex functions vs using the filter functions for cleaning and validating user input. |
|
|||
|
On Sun, 11 May 2008 16:56:01 +0200, William Gill <noreply@example.com>
wrote: > I have decided that Since I have to update the processing on many of my > forms, I'm going to start them all over from scratch. Before I begin I > thought I'd solicit comments on using the PHP regex functions vs using > the filter functions for cleaning and validating user input. What are the 'filter functions' you're talking about? Besides that, validating is often just using the right tool for the job. Is it a number, is a record in a database that should exist etc... All depending on the desired implementation. -- Rik Wasmus [SPAM] Now temporarily looking for some smaller PHP/MySQL projects/work to fund a self developed bigger project, mail me at rik at rwasmus.nl. [/SPAM] |
|
|||
|
Rik Wasmus wrote:
> What are the 'filter functions' you're talking about? > filter_has_var() filter_id() filter_input_array() filter_input() filter_list() filter_var_array() filter_var() But I now realize they are part of an installable extension, not core PHP. So the point may be moot, since I no longer run my own servers (and thus can't control extension installation) > Besides that, validating is often just using the right tool for the job. > Is it a number, is a record in a database that should exist etc... All > depending on the desired implementation. .... and preventing unwanted or hazardous input, and so on, so I asked about two of the many tools I see in PHP. |
|
|||
|
William Gill wrote:
> > But I now realize they are part of an installable extension, not core > PHP. So the point may be moot, since I no longer run my own servers > (and thus can't control extension installation) per phpinfo() it is installed and available on my host's servers so I'm still curious to hear peoples thoughts. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|