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).

Did you know?Explore Trending and Topic pages for more stories like this.
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

PHP onsubmit in the form not going to the fuction.
I have a form through ‘onsubmit’ calling a function validation(). But not going to the

$variable = $variable
Hello

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

php file erros / need help please
Hello

Someone decoded a zend file for me.. after uploaded it on ftp i get some errors, i trye

Problem with php's rename function
So, i'm having a problem with the php rename function. Basically my script 'delete_user.php' attempt

Converting RGB values to HEX
Code: <?PHP

$file_handle = fopen("colors/rgb.csv", "r");

wh

Save cookie to DB
I'm working on a pixel tracking script for an incentive website and I need to use an ASP script to s

A little help in c#
i am doing a simple paint program using c# i want to draw with the mouse so i wrote the code of the

PHP Tab Control
Hi All,

I would like to have PHP tab control with/without Javascript.

But I want to r

Prevent PHP mail( ) from appending hostname to from address
Hey guys,

I want to be able to send texts to phones via email (since each phone has their own

Drop Down and text box issue
Is it possible to set a drop down list and text boxes to a certain width?

here is my code

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