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

Socket Server
In my following socket server, I am trying to listen to a connection through port 12345 in my web br

PHP code needed to get/post form fields and request mysql query results.
I'm new to PHP

I've created an html form to allow the user to request a basic telephone dire

turning an array into a string then poping it into a db
Hi im just wondering how you get a requested array into a single string then pop it into the db so f

Edit MySQL Row Using PHP and HTML Form
Hello,

Here's what I'm trying to do. Build a page where a user enters a MySQL row number in.

Regarding accessing SQL query issued by any user in Oracle 10g
Hi all,
i want to know the queries issued by various users accessing a database...

Email with Attachments in PHP
Hi Friends

How to send email in PHP with attachment.
I know simple mail can be sent with

Help with php code
Hello, can anyone tell me why this php word trap fails to work,
and the trigger words get blow r

Running External Scripts
I am very new to PHP and am not even sure what I'm asking is possible. I have just installed mediaW

Cannot Display Array from Select Statement + Login question
Hi,
I'm new to PHP but so far so goog. I was assigend a project and I'm very close to completion.

grouping within a foreach?
hello all,

I currently have a list of products spit out from my db via a foreach loop. Right

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