Jump to content

Archived

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

hexica

PHP MySQL Tickbox help

Recommended Posts

Hi guys/gals,

I built a simple php/mysql database for the job listing pages on a medical recruitment website [a href=\"http://www.mediplacements.com\" target=\"_blank\"]http://www.mediplacements.com[/a] ).

It's very basic but works fine, so they are happy. At the moment any job can only be in 1 area because of the diversity of each area. They now want to create a seprate website purely for the care worker section of the business.

The trouble is, each job needs to be in several different areas. For example a job for social work in London would fit both 'social work' area, and also 'elders' area.

The immediate thought was to have tickboxes for all the areas on the job submit page - then I realised I don't have a clue how the hell I could send the data into the mysql database!

So basically - using tickboxes how do I get the results into a database?

I could do it a very long way round so each tick box has its own colomn in the joob database, and ticked=1, not ticked =0 - but isnt this a long winded way to do something relatively simple?

Any help or pointers greatly apreciated!

Share this post


Link to post
Share on other sites
in your database scheme, you should allow a field name for each of the areas you could put the job into, eg "social_work", "elderly" etc etc.

Then each tickbox is assigned the value of '1' when ticked, which updates the appropriate columns of the database with 1 if it is selected, and leaves blank if not.

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.