faqts : Computers : Programming : Languages : PHP : Common Problems : Forms and User Input

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

28 of 41 people (68%) answered Yes
Recently 6 of 10 people (60%) answered Yes

Entry

How can I run all form variables through a function automatically?

Jun 30th, 1999 19:40
Nathan Wallace, Steve Douville


The following code will run all my_func for all POST form variables:

while(list($key,$value)= each($HTTP_POST_VARS)){
    $$key = $value;
    my_func($$key);
}