> "Peter J. Krawetzky" <[EMAIL PROTECTED]> wrote in
> message 001001c11697$fe331d40$[EMAIL PROTECTED]">news:001001c11697$fe331d40$[EMAIL PROTECTED]...
> 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
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]