using explode() to fill in checkboxes


Posted on 16th Feb 2014 07:03 pm by admin

Hi

I have a field stored in a table that contains regions in the UK separated by commas. There could be any number of pieces held in this field from 1-12, based upon the users specified operating region (i.e. they could operate in multiple regions).

I have then created a form with 12 check boxes, 1 for each possible region they could have specified. I need to automatically tick the relevant box for each region they have specified (i.e. each piece of data held in the field).

Is this doable?

I have tried experimenting with explode() but cannot figure out to this information to specific whether a check box should be ticked by default

No comments posted yet

Your Answer:

Login to answer
120 Like 25 Dislike
Previous forums Next forums
Other forums

Using two $_POST Function / Switch () statements, second does not work.
Hi all. I’m new to php and am having a problem getting $_POST Function / switch () to work. I

Forum tutorial
Im a beginner in PHP. Im making a forum(previous questbook, counter and few others) to learn. For no

Allegro crashes when running load_bitmap. Why?
I can not get Allegro to load any BMP images. Here is a section of test code. The picture is in the

DirectoryIterator and Hacked Website
Hi Everyone.

My problem:
Some one has been sneaking in to my website hidden Iframes. I've

$variable = $variable
Hello

Sorry if this is a really simple question but I have run out of ideas. Is there a reall

reading xml faster than DB call?
I am trying to optimize a high traffic website, and I enabled a feature where there are three photos

Show message after entering data
Hello Colleagues

I would like to display messages after entering the data example: "
dat

Take info from one coloum and move to another
Hi all,

I have this:
Code: [Select]$array = "SELECT stock_id FROM stocks WHERE stock_

array & querys help/advice.
Ok so here goes , I have a mysql database and basically here's what I need to do.

// foreach

session variable problem
Session variable is not working in Fire fox i am getting null value but it is working fine in IE.

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