2
Contributors
3
Replies
4
Views
8 Years
Discussion Span
Last Post by diafol
0

Have you checked the view-source?
They use the same name for all checkboxes and apply a numerical value to each based on the 'id' of the category in the DB.
So the $_POST variable will contain an array of values. You then need to either loop through this array OR create a comma separated list from this array to use in your SQL statement (hint - you'll need to use the IN keyword in the WHERE clause).

0

thanks for your help ardav. greatly appreciated (:
i encounter another problem. now my job posting system can only post 1 job for a user. any idea what's the problem or any suggestions?

0

Where is the problem? With the post variable or with your database field?

Your DB should have a structure something like:

user
id (PK)
username
...etc...

jobs
id (PK)
job_title

user_jobs
id (PK)
user_id (Foreign Key on user.id)
job_id (Foreign Key on jobs.id)

(This last table could be v.big, but that's OK, e.g. 30 jobs for each user. Even if you've got 10,000 users, that's still only 300,000 records - nothing for mysql)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.