Re: populate form input option dropdown box from existing data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



PJ wrote:
> It does, indeed. This confirms my inexperienced conclusion that
> in_array() does not work on associative arrays per se; it works on
> simple arrays and I just don't have the experience to think of
> extracting only the id fields.
> I actually am using a slightly more complicated if else statement which
> works.
> Also, the other problem was the option selected definition required
> Shawn's clarification
> <select name='component-select' multiple ... which now highlights the
> selected fields.
> In all my searches (horrendously wasted time) I did not find any mention
> of "component-select" either in php.net or w3c.org (I don't think my
> queries on Google brought up anything from php.net) but w3c.org did and
> I had looked at the page but somehow missed it.
>   
The name is not what makes it work.  That's just an example name I
copied from w3c.  It could be anything.  What makes it work is the
multiple.  This will work just as well (notice you need the array if you
want multiple values passed in $_POST):

<select name="pjs-select-thing[]" multiple>


-Shawn


> I'm going to have to look at the way I search things. When you are
> looking for something specific, other, even relevant, solutions seem to
> get screened out.
>
> Anyway, I learned quite a bit, here.
> Thank you very, very much, gentlemen.
> PJ
>
>   

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux