Jump to content

Archived

This topic is now archived and is closed to further replies.

feri_soft

how to add items from multiple select

Recommended Posts

How to add to the datatbase items from a multiple select in one field seperated by comas.

For example i have a select called extras and it has
Tv
fridge
pool


an so on.
how can i add the values a user have selected into the databse seperated by comma.

like
extras: tv,pool


Thanks

Share this post


Link to post
Share on other sites
Are you using a radio buttins as a means of selection or what? You could put the results in an array and use implode.

Share this post


Link to post
Share on other sites
I use a <select name="asdasd" multiple><option>........</select>


how exatcly to do the job,can you give me a working example

Share this post


Link to post
Share on other sites
If your looking how to select multiple items in one selection box, then I do not know how to do it, without having multiple submit or select boxes, very messy?  Also are you getting your options from a database or are they static?

Share this post


Link to post
Share on other sites
They are static....its easy to select some options holding control and clicking on different options
but in the database there is only the first option you clicked!?

Share this post


Link to post
Share on other sites
try printing the asdasd field. Like this.
[code=php:0]
print_r($asdasd);
[/code]
See if that returns an array with the multipule options.


Good luck,
Tom

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.