Re: Not Really A DB Question

From: Date: Fri, 27 Jul 2001 23:37:41 +0000
Subject: Re: Not Really A DB Question
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-10851@lists.php.net to get a copy of this message
> "Peter J. Krawetzky" <krawetzky1@earthlink.net> wrote in > message > news:001001c11697$fe331d40$91131eac@W559878.hartford.aetna.com... > How do you loop through all the text objects in a PHP script? In otherwords, > I want use logic to check the value of each textbox without specifically > referencing the actual object name. Name all your textboxes as "tb_whatever", then function isTextBox($varname) { return (eregi("^tb_", $varname)); } and you can check through all passed vars like foreach($HTTP_GET_VARS as $key => $val) if (isTextBox($key)) checkValue($val); foreach($HTTP_POST_VARS as $key => $val) if (isTextBox($key)) checkValue($val); > Visual Basic has this type of logic. Oh, WELL then :-P

« previous php.db (#10851) next »