Re: Re: Retrieving Stored Values for Dropdown Menu

From: Date: Wed, 28 Jul 2004 18:38:05 +0000
Subject: Re: Re: Retrieving Stored Values for Dropdown Menu
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-192111@lists.php.net to get a copy of this message
I'd like to make a few changes here to hopefully answer the original question. On Wednesday 28 July 2004 01:35 pm, Ed Lazor wrote: echo "<select name=\"record\">"; while ($record = mysql_fetch_array($results)) { if ($_POST["record"] == $record["ID"]){ $SELECTED = " SELECTED "; } else { $SELECTED = ""; }         echo "<option value='" . $record["ID"] . "' ".$SELECTED.">" . $record["Title"] . "</option>\n"; } echo "</select>"; James Hicks

« previous php.general (#192111) next »