hexica Posted June 1, 2006 Share Posted June 1, 2006 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! Quote Link to comment https://forums.phpfreaks.com/topic/10957-php-mysql-tickbox-help/ Share on other sites More sharing options...
wisewood Posted June 1, 2006 Share Posted June 1, 2006 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. Quote Link to comment https://forums.phpfreaks.com/topic/10957-php-mysql-tickbox-help/#findComment-40921 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.