Re: how to create multiple selects within php
| From: | Brian | Date: | Mon, 18 Oct 2004 14:35:26 +0000 |
| Subject: | Re: how to create multiple selects within php | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-199727@lists.php.net to get a copy of this message | ||
with your code above the first option is going to be the default, so
just make the default nothing:
<option value='blank'></option>
then check with:
if ( $_GET['foo'] <> 'blank' )
On Mon, 18 Oct 2004 07:22:30 -0700, bruce <bedouglas@earthlink.net> wrote:
> ok...
>
> it appears to be a case of user err.. the spec seems to state that if the
> user doesn't select/specify an item, the select should return the 1st item
> within the list... arrrgggh!! this is what's happening...
>
> so my question is still, how can i implement some logic that requires the
> user to actually select an item? or, how can i detect when a user has
> actually selected a list item??????
>
> thanks...
>
> -bruce
>
>
>
>
> -----Original Message-----
> From: bruce [mailto:bedouglas@earthlink.net]
> Sent: Monday, October 18, 2004 7:07 AM
> To: php-general@lists.php.net
> Subject: [PHP] how to create multiple selects within php
>
> hi...
>
> i can create a form with a single select by something like:
>
> <form>
> <select name='foo'>
> <option val='1'>fff</option>
> <option val='2'>aaa</option>
> </select>
> <input >
> </form>
>
> however, i need to know how to create a multiple menu/list within a single
> form.
>
> i've tried a few different approaches, but i'm doing something wrong, in
> that the querystring is being populated with a value for the select list var
> even though i don't select the item.
>
> if someone can point me to an actual working example of php code that
> generates multiple lists/menus within a form, i'd appreciate it!!
>
> thanks
>
> -bruce
>
> ps. if needed, i can supply the actual test code i've used to create the
> condition i'm describing...
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>