Hi Kh99,
I know its been a while since I had this issue, but I have since been trying using another method.
Instead of using the old method:
Code:
// Store all checkboxes as array
$a_offenses = array("Team Killing", "Team Tazing", "Team Nading", "Team Peppering", "Team Injuring", "Insulting Players", "Insulting Admins", "Insulting Clan Members",
"Tag Stealing", "Cheating / Hacking", "Disallowed Name", "Inappropiate Language", "Spamming", "Advertising / Recruiting", "Rambo Gameplay", "Random Shooting" , "ROE Violations",
"Use of Non-English", "Dropping as VIP", "Spawn Killing", "Camping", "Injuring / Killing VIP", "Injuring / Killing Civilians");
I am now retrieving this array from a MYSQL table.
Example:
$a_offenses = $db_offenses['list'];
Value stored in MYSQL column 'list' is the array eg. "Team Killing, Team Tazing, Team Nading" etc.
Now the problem is back again. I removed your first solution to simply:
Code:
$offenses = explode(',',$row['offenses']);
and it partially works. When I say partially, multiple boxes are ticked but for some elements of the array the box remains unticked.
Eg.
Offenses listed in DB; Team Killing, Team Tazing, Rambo Gameplay
Checkboxes ticked: Team Killing, Rambo Gameplay
So some are missed from the stored values. I looked at how both arrays are stored in the DB and cant see any extra spaces.
Can you help?
--------------- Added [DATE]1343584787[/DATE] at [TIME]1343584787[/TIME] ---------------
Dont worry, forgot to pass both variables through array_map.
Thanks once again!