Jump to content


PHP MySQL Tickbox help

  • Please log in to reply
1 reply to this topic

#1 hexica

  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 01 June 2006 - 02:29 PM

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!

#2 wisewood

  • Members
  • PipPipPip
  • Advanced Member
  • 226 posts
  • LocationRotherham, England

Posted 01 June 2006 - 02:52 PM

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.
wisewood: proven fact, I am both wise, and wooden.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users