Re: [PHP] Select value for driopdown box

2003-01-25 Thread Greg Beaver
t; -Original Message- > From: Michael Sweeney [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, January 22, 2003 10:29 AM > To: Ben C. > Cc: [EMAIL PROTECTED] > Subject: Re: [PHP] Select value for driopdown box > > > Assuming that you know which state is selected b

RE: [PHP] Select value for driopdown box

2003-01-25 Thread Ben C.
I tried to use the below but it does not work. Please help! -Original Message- From: Michael Sweeney [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 22, 2003 10:29 AM To: Ben C. Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Select value for driopdown box Assuming that you know which

Re: [PHP] Select value for driopdown box

2003-01-22 Thread Jim Lucas
lue pair that has the value that you are looking for as the key and if it matches it will make that key - value assoc the selected one. that should work for you - Original Message - From: "Ben C." <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, January 22,

Re: [PHP] Select value for driopdown box

2003-01-22 Thread Michael Sweeney
Assuming that you know which state is selected before you build the select list: $sel_state = $_REQUEST['state']; ... while($row = mysql_fetch_array($result)) { $buyerid = $row['buyerid']; $state = $row['state']; $selected = $state == $sel_state ? "selected=\"selected\"" : ""; $

[PHP] Select value for driopdown box

2003-01-22 Thread Ben C .
I am using the query below to edit a record. I want to edit the field which has a list of states in a dropdown box. I want to have the state that is in the selected field shown as the selected state. How would I do this? Query - $state"; } $display_block = " $optio