validating user input: regex vs. filters?

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 ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-11-2008
William Gill
 
Posts: n/a
Default validating user input: regex vs. filters?

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.

Reply With Quote
  #2 (permalink)  
Old 05-12-2008
Rik Wasmus
 
Posts: n/a
Default Re: validating user input: regex vs. filters?

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]
Reply With Quote
  #3 (permalink)  
Old 05-12-2008
William Gill
 
Posts: n/a
Default Re: validating user input: regex vs. filters?

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.
Reply With Quote
  #4 (permalink)  
Old 05-12-2008
William Gill
 
Posts: n/a
Default Re: validating user input: regex vs. filters?

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.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 02:15 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0