I have a bunch of checkboxes and then on the next pg i check which boxes were ticked
Here is my code
PHP Code:
$i = 0;
$array = "";
foreach(array_keys($_POST) as $myKey)
{
echo "ee";
if (ereg('value', $myKey))
{
echo "hi";
$id = ereg_replace("value='checkbox'", "", $myKey);
$array[$i] = $id;
$i = $i+1;
}
}
If none of the boxes are ticked i get errors
I want to check if boxes were not ticked and if none was ticked then send a user to another page
But ive tried every way i can think of and cant get it to work
Any ideas?