Multiple Dropdown Selections


Posted on 16th Feb 2014 07:03 pm by admin

I have a form that let's a user insert a page with the ability to select categories. I want them to have the ability to select multiple categories. I have a select drop down menu with the "multiple" attribute applied(<select name='category' multiple>).

My question is, how would I get the categories they selected and display them like below:
Quote1, 2, 3, 4, 5
Did you know?Explore Trending and Topic pages for more stories like this.
The numbers are the ids of the categories, which is the value of the selections, and will be located in one column of the table that the current record is being created in.

Another question...

These categories are fetched from a database table(categories). The table that these records are being inserted to(pages) with this form has a column called pageID and a column called CategoryID. What I want to do is to have a page for a specific category that will fetch a list of all the pages that are under this category.

Example: a page has categories of 1, 3, and 5. The user is viewing category 5. The category page should contain a list of content pages from category five.

How would I create a query that would do this?
No comments posted yet

Your Answer:

Login to answer
322 Like 49 Dislike
Previous forums Next forums
Other forums

There was a problem with the request. (Code: 0)
Any Idea what could cause this? I get it randomly at best. But with both IE and FF. It derives from

Specific name typed, specific image shown on html page
Hello,

Fairly new to PHP and was curious if someone might know how to solve a fairly simple r

PHP/Database issue
My friend is helping me make a database where you go to a certain webpage of my site and the page wi

Problem with an browser game.
Hello,i just joined that great forum and i got php prob,its kinda freaky...anyway i got browser game

Deleted Delivery but material wont return
We deleted a delivery but the material its still pending.

We made a reverse goods movemen

Problem with variable declaration in switch statement
Hello, I am having some trouble assigning a value to a variable inside a switch statement. What I a

j1inmis Ouput layout changes
Hi,

Can anybody tell how can j1inmis output layout can be changed so that vendor names ge

Having a problem get the selected item from a drop down menu
I have been looking at this for days now.

I have a drop down menu that get it's values from a

Image resize
Hi again fellers

I managed to sort out the issues with the folder,

Final hurdle is th

get font info from a font file
hello,

Does anyone know how to get font info from a font file ... using php of course !
<

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash