i used the same techniqu a while back when i worked with Fast Template.
scenario:
- present a user with a form to input
- there are several text fields and several select options
- if there is/are error(s) upon form submission, we will call the same template
file and insert proper error messages a
> From: Nathan Cook [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 25, 2002 2:52 PM
> Subject: Re: [PHP] New way to make select boxes auto select
> How are you able to quickly and painlessly determine which
> key gets the
> selected value, from form submission data,
From: "Johnson, Kirk" <[EMAIL PROTECTED]>
> Do you know what happens here if the error reporting is set to max?
> Are a bunch of "unitialized variables" warnings issued?
That would be my assumption. I suppose you could initialize the variables
first to circumvent that. I was more or less looking
> // buildSelect -- return a Select box named $selectName based on key
value array $selectArray
> ...
> // $arr = array('MD'=>'selected','DC'=>'','VA'=>'');
How are you able to quickly and painlessly determine which key gets the
selected value, from form submission data, when building the initial
> From: Nathan Cook [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 25, 2002 12:34 PM
> Subject: [PHP] New way to make select boxes auto select
>
>
> You may already be doing it like this, but I think I found a
> new way to
> make select boxes auto-select (what data they put in) a lot
> eas
Nathan, this is a new idea to me and very interesting. Do you know what
happens here if the error reporting is set to max? Are a bunch of
"unitialized variables" warnings issued?
Thanks for contributing this to the list.
Kirk
> -Original Message-
> From: Nathan Cook [mailto:[EMAIL PROTE
Interesting technique. Depending on your error_reporting levels, you may get
a bunch of undefined variable warnings, though.
I usually use a config file with arrays for my select boxes. Something like
$_CONF['Something'] = array("This","That","And","Something");
Then just create a function like
7 matches
Mail list logo