Sorry, I was trying to use weedpackets validation with another persons suggestion on making the answers and array so I can insert them.
I broke these 2 apart to clear up the issues.
But now, if I vote for nobody, it tells me I did not vote, but if I vote for just a single person, it completes the proccess, (it should not let me continue until I voted for all the people).?
Here is what I have for the validation now.
//Make sure they voted for all celebs
if(!isset($_POST['N'])) { // You did not select any boxes
$_POST['N'] = array();// Make it an array
die("<p align='center'><font face='Arial' size='3' color='#FF0000'>You did not vote for all the celebrities. <br>Please hit the back button and finish voting.</font></p>"); // Go back
}
And for the names array...
//Loop thru the posts
$_POST['Name'] = array();// Make it an array
foreach ($_POST['Name'] as $n) { //Set the elements in the array
for( $c = 0; $c <= 45; $c++ ) {
${'Name'.$c} = $n[$c];
}
}
IThere must be a different validation technique to ensure all the selection where filled in, I just dont see it here.
Any ideas?
Thanks,
Don