Inserting correct value from database into form option field

From: Date: Sat, 28 Apr 2001 08:32:47 +0000
Subject: Inserting correct value from database into form option field
Groups: php.db 
Request: Send a blank email to php-db+get-8953@lists.php.net to get a copy of this message
Hi guys Created a database and now I've done the pages for editing it. This is what I have... <tr><td>Which Voyage:</td><td><select name="voyage" COLS=100 ROWS=1 value="<?php echo $row["voyage"] ?>"> <option value="One voyage only">One voyage only</option> <option value="First voyage">First voyage</option> <option value="Second voyage">Second voyage</option> <option value="Third voyage">Third voyage</option> <option value="Fourth voyage">Fourth voyage</option> <option value="Fifth voyage">Fifth voyage</option> <option value="Sixth voyage">Sixth voyage</option> <option value="Various voyages">Various voyages</option> </select></td></tr> When I get the record and open it for editing it automatically selects the first option from the list. I would like it to show the original value from the stored record. Any ideas??.... Howard Picken hpicken@our.net.au Launceston, Tasmania, Australia

« previous php.db (#8953) next »