I have a form on a php page with a form:
<form name="approve" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST">
I agree to the terms and conditions of this Agreement:
<input type="checkbox" name="agree" value="ON"> <input type="submit" value="Submit">
then after the form is submitted I want to check if a checkbox has been checked and forward to the next page for a user to enter their info. At the top I put:
<?php
if(isset($_POST['action']) && $_POST['action'] == 'submitted'){
if($_POST['agree']==true){
--forward to next page here--
}else{
--javascript pop up you must agree to continue--
}
}
?>
Can you please help me fill this in? It's been a while since I've PHP'd.
Thanks
<form name="approve" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST">
I agree to the terms and conditions of this Agreement:
<input type="checkbox" name="agree" value="ON"> <input type="submit" value="Submit">
then after the form is submitted I want to check if a checkbox has been checked and forward to the next page for a user to enter their info. At the top I put:
<?php
if(isset($_POST['action']) && $_POST['action'] == 'submitted'){
if($_POST['agree']==true){
--forward to next page here--
}else{
--javascript pop up you must agree to continue--
}
}
?>
Can you please help me fill this in? It's been a while since I've PHP'd.
Thanks