On Monday, January 28, 2002, at 10:41  AM, Simos Varelakis wrote:

> A php form  contains a listbox  (named foolist) with n Items which can 
> be
> multiple selected and form posted to
> results.php how can results.php determine which items were selected in 
> order
> to add all the items in a Mysql table ???

You can define each <option> in a listbox with an array element as its 

Like so:

<select name="listbox">
    <option value="var[0]">Item 1</option>
    <option value="var[1]">Item 2</option>
    <option value="var[2]">Item 3</option>

That's one way to do it.  Personally, if I'm populating a listbox with 
results returned from a SQL query, I use the primary key of the record 
as the "value" attribute in <option>.



Erik Price
Web Developer Temp
Media Lab, H.H. Brown

PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to