Hey Everyone! It's 6:29pm EST and I have been working on this same problem since about 9am. I'm usually able to Google my way to the solution- but I have reworded my search numerous times and went through mountains of forums trying different approaches but to no avail. Here is what I have...
Main.php
A webpage with three disclaimers that have to be read. Each disclaimer is presented in an iFrame- and each disclaimer has a checkbox below it that must be checked in order to move forward. Here is the form code on this page...
<form action="DisclaimProcess.php" method="POST">
<iframe width="560" height="315" src="DisclaimerPage1.php" frameborder="1"></iframe>
<P align="justify" font-size: "12px" style="color:red"><strong>
<input type="checkbox" name="Disclaim1" required /> Checking the box is my electronic signature, and the equivalent of my handwritten signature, in acknowledgment of the above.
<br /></p></strong><br/><br/>
<iframe width="560" height="315" src="DisclaimerPage2" frameborder="1"></iframe>
<P align="justify" font-size: "12px" style="color:red"><strong>
<input type="checkbox" name="Disclaim2" required /> By checking the box I acknowledge I have read and understand the above information.
<br /></p></strong><br/><br/>
<iframe width="560" height="315" src="DisclaimerPage3" frameborder="1"></iframe>
<P align="justify" font-size: "12px" style="color:red"><strong>
<input type="checkbox" name="Disclaim3" required /> By checking the box I acknowledge I have read and understand the above information.
<br /></p></strong><br />
<input type="submit" name="submit" value="Continue" />
</form>
Now in Firefox and Google Chrome- this works great by itself because the "required" inside the 'input tag' will not let you continue unless they are checked- but in Internet Explorer (which is why this has taken me longer than 1 hour to figure out) it let's you continue to the next page no matter what is checked. Anyways...
DisclaimProcess.php
This is the page that processes the form to make sure all checkboxes are checked. What it SHOULD do is if all checkboxes are checked then load the next page. If any of the checkboxes are not checked then it should send them back to the Main.php with the alert that they must check all checkboxes to continue. Now the code below is a broken example of what I would like it to do- I've never had any code fragments work correctly today so this will hopefully give you enough info.
<?php
$Disclaim1 = $_POST['Disclaim1'];
$Disclaim2 = $_POST['Disclaim2'];
$Disclaim3 = $_POST['Disclaim3'];
echo($Disclaim1);
$total = 0;
if(isset($Disclaim1)
$total =$total+1;
if(isset($Disclaim2);
$total =$total+1;
if(isset($Disclaim3);
$total =$total+1;
if($total!=3)
{
echo("USE MUST CHECK ALL BOXES TO CONTINUE")
include ('main.php');
}
else
{
header("Location: yay.htm");
}
?>
Thank you so much in advance for your help... I'm going home.