Re: [PHP] New way to make select boxes auto select

2002-07-25 Thread 1LT John W. Holmes
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

RE: [PHP] New way to make select boxes auto select

2002-07-25 Thread Johnson, Kirk
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

RE: [PHP] New way to make select boxes auto select

2002-07-25 Thread Matt Schroebel
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 easier. All

Re: [PHP] New way to make select boxes auto select

2002-07-25 Thread Nathan Cook
// 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

Re: [PHP] New way to make select boxes auto select

2002-07-25 Thread Nathan Cook
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 for a

RE: [PHP] New way to make select boxes auto select

2002-07-25 Thread Matt Schroebel
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, when building the initial

Re: [PHP] New way to make select boxes auto select

2002-07-25 Thread Roger Thomas
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