Re: dynamic form help
| From: | Richard Creech - DreamRiver.com | Date: | Wed, 22 Nov 2000 21:00:08 +0000 |
| Subject: | Re: dynamic form help | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-26707@lists.php.net to get a copy of this message | ||
Jon,
This will populate your select list with the desired value:
/* Outcome: the select option chosen by the user remains selected */
Category <select name="snack">
<option value="<?php echo $snack;?>" SELECTED><?php echo
$snack;?></option>
<option value="pineapple">pineapple</option>
<option value="potato chips">potato chips</option>
<option value="chocolate bar">mmm chocolate</option>
</select>
A comprehensive article on how to build dynamic form controls is to be published soon on
phpbuilder.com.
Kind Regards,
Richard Creech
richardc@dreamriver.com Phone: 250.744.3350 Pacific Time Canada
Get a free link at http://www.dreamriver.com/phpYellow/
Download phpYellow Pages 2000 - Now shipping Version 1.061 with EasySQL!
Add Dynamic Database Content to your Website
http://dreamriver.com/software/
>At 01:46 PM 11/22/00 +0000, Jon wrote:
>Message-ID: <001501c05442$929e0c60$89ab1841@slinkyboi>
>From: "Jon Rosenberg" <php@columbusinteractive.com>
>To: "PHP List" <php-general@lists.php.net>
>Date: Wed, 22 Nov 2000 00:10:46 -0500
>MIME-Version: 1.0
>Content-Type: text/plain;
> charset="iso-8859-1"
>Content-Transfer-Encoding: 7bit
>Subject: dynamic form help
>What would be the best way to do the following?
<snip>
>how can I make it so that the 'selected' appears in the right place? and
>yet still include all the other options so they can change it if they want
>to?
>Thanks for any ideas.
>Jon
____________________________________________