Re: Getting the current value of a select field

From: Date: Tue, 08 Apr 2003 17:07:27 +0000
Subject: Re: Getting the current value of a select field
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-142916@lists.php.net to get a copy of this message
Sorry here is the code! <tr> <td>Status</td> <td> <select name="booking_status">'; if ($booking_status == '2'){ echo '<option value="2" selected>Complete</option> <option value="1">Cancelled</option> <option value="0">Not Complete</option>'; }else if ($booking_status == '1'){ echo '<option value="2">Complete</option> <option value="1" selected>Cancelled</option> <option value="0">Not Complete</option>'; }else{ echo '<option value="2">Complete</option> <option value="1">Cancelled</option> <option value="0" selected>Not Complete</option>'; } echo '</select> "Shaun" <shaun@mania.plus.com> wrote in message news:20030408170634.53894.qmail@pb1.pair.com... > Hi, > > Is there a more elegant way to show a select box with the correct value than > this: > > >

« previous php.general (#142916) next »