Need help with agreement ticking box

hi, i created a “agreement page” & it has a box where you have to click it & then click the button to continue.

here’s my code: [CODE]

I have read and agreed to these terms, and I am the owner of the paypal account and/or credit card being used 
<input onclick="window.location.href='http://www.tizenx-rsps-applications.com/donate/index.php'" type="button" value="Continue to donate"

name=“Tizenx_donate”>

[/CODE]

but you can click the button even if the box is there ( i know this is a html format my code so im guessing what i’m asking in, it’s php required)

I NEED/want everyperson to click the box to be selected (checked) before clicking on the button to continue.

Example - Click on the box to be selected (checked) then you can proceed to click on the button to continue to the other page
if you’re not getting it still

here’s another example

Anyone can click on the button to continue on the other page, but i don’t want that, i want the people to click on the button to be selected & then they can click on the button to continue on the other page.

please reply asap, i need this. Thanks!

Hi, I would do something like this… i have slightly changed your example.

I have added in a submit button instead of your button and set the value of the checkbox to 1, above the form i check that the submit button has been pressed and then check that the value of the checkbox is equal to 1 ( this means they have ticked the box )

The new form

I have read and agreed to these terms, and I am the owner of the paypal account and/or credit card being used 

[php]

check if the user has submitted the form

if(isset($_POST[‘submit’])) {
#set the variable from the form
$terms = $_POST[‘terms’];

check if the box has been ticked

if($terms ==1) {
 # the form has been ticked send to the next page
  header("Location: http://www.tizenx-rsps-applications.com/donate/index.php");
}else{
   echo "You must agree to the terms before going to the next page";
}

}
[/php]

Sponsor our Newsletter | Privacy Policy | Terms of Service