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
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?

322 Like 49 Dislike
Previous php-forum Next php-forum
Other php-forum

Database/Table Collation
What is the Database, and table collations used for? i don't understand what there used for since co

Checking if field is empty AND using !is_numeric
Hi lads,

Need to be able to display an error message (using isset?) that says "Cant lea

url- go to webpage
i have an input text field and submit button.

how do i make the url entered into the textfiel

text box alphanumeric caracters only
hi all!

I have search on google on how to enter in a test box only caracters A-Z,a-z,0-9 usi

Inserting Data into a MS Access DB using PHP.
As part of my uni course I am doing a placement at a company whom want me to create a client zone fo

bit of help needed
Im about to sort out my registration page for my website by customising a "registration" s

Comment Mod System Effects all rows...
Sorry if its confusing but here is whats going on: I have a table in a database called comments and

contact form - output to page and email
I have the following in my controller:

$message['name'] = htmlentities(strip_tags(trim($_POST

need help in update query
hi
i have a dynamic form. i need help in how can i use update query when values from dynamic for

Not capturing all the information we require in the form.......
Hi Guys,

I was wondering if you would share some more of your knowledge today, I'm hoping it

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