RE: [PHP] Re: Retrieving Stored Values for Dropdown Menu

From: Date: Wed, 28 Jul 2004 17:35:45 +0000
Subject: RE: [PHP] Re: Retrieving Stored Values for Dropdown Menu
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-192105@lists.php.net to get a copy of this message
> <option selected><?php echo $Variable; ?></option> > Can you see any obvious problems I might miss.? You're specifying a variable for the option's text, but you also need to specify the option's value. For example, if you were retrieving data from MySQL: while ($record = mysql_fetch_array($results)) { echo "<option value='" . $record["ID"] . "'>" . $record["Title"] . "</option>\n"; }

« previous php.general (#192105) next »