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

Showing selected item at top of list
Hi,

I've got a list of names which i am fetching from database like this:
$qry = db_query

PHP - MySQL Fail
My PHP code will only execute the first part of my code...

Code: <?php

sessio

Detail Expenses Report by Cost Center
I would like to obtain a report out of SAP that shows a list of expenses by cost center that shows t

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

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

Inserting multiple records from single form
I've found a number of threads that deal with this issue, but I'm new to php and coding language so

Running a cron job through PHP/Apache?!
Hello all,
I have a PHP script which makes a cron file from user input. When i try to run the cro

Help with captcha script needed
Hello,

I am working on a script where reCAPTCHA or a similar form of CAPTCHA will be used, f

How to display objects in a row
I have 7 codes that i want to display in a row one next to another.
The first is {$ads->ad

Why does my php page download images over and over
Can anybody please explain to me why my php page keeps downloading the images and other items every

Wordpress IE issue
So I am trying to add the background shadow to my wordpress page. It works fine in Firefox but does

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