Re: option in forms

From: Date: Sun, 10 Feb 2002 01:08:04 +0000
Subject: Re: option in forms
Groups: php.db 
Request: Send a blank email to php-db+get-16768@lists.php.net to get a copy of this message
I think this is what you're getting at: <select name="artistID"> <option value="<?= $row["ID"] ?>"><?= $row["ArtistName"] ?></option> </select> or something like that.... so it would look like (in HTML) <select name="artistID"> <option value="23">Artist's Name First in list</option> <option value="44">Artist's Name second in list</option> <option value="105">Artist's Name third in list</option> </select> if you select the first item in the list, the next page will produce: $artistID = "23" so yah... thats it -------___--------_-_--_-_-_-_-___-----______----_--_-_-----_-_-- I know how to do the option call e.g. This is the list of artists already in our database : <SELECT name="artist"> <?php echo "$option_block"; ?> </SELECT> But I want to do a form where they select the option then fill out rest of form. The option above returns the artist name, but I want to insert the artistid.

« previous php.db (#16768) next »