Page 1 of 1

tick box on form

Posted: Sat Apr 10, 2010 7:53 am
by scorpio90
hi guys hopefully someone can help me ..

i need to insert a tick box on a form so that a client can click it once they have read and accepted the terms and conditions,

it would be a huge help if anyone could give me advice on this as im really confused with it.

thankyou in advance :D

Re: tick box on form

Posted: Sat Apr 10, 2010 10:43 am
by solid
If I'm understanding you correctly, then the quickest and easiest way to accomplish this would be have the form set a SESSION variable like:

Code: Select all

session_start();
$_SESSION['agreed'] = TRUE;
Then have each page check for that SESSION variable, and show the form if they haven't agreed, like this:

Code: Select all

session_start();
if ($_SESSION['agreed'] = TRUE)
{
   // show page
}
else
{
   // show form
}
If you are asking about the 'tick box' itself, just use javascript on the checkbot to have it submit the form onClick.