...

View Full Version : Registering?



SMGames
07-06-2007, 12:25 PM
Hi, on my website when you register you have to tick the boxs to say that you are over 13 and you agree to the terms of service, how would i make it so you cannot register until you have tick the 2 boxes.

I have this:


<script language=JavaScript>

function over13check(a)
{if (a.over_13.checked == false )
{alert('You must be over 13 to register on SMGames.');
return false;}
else
return true;}

function toscheck(t)
{if (t.tos.checked == false )
{alert('You must accept the Terms of Service in order to register.');
return false;}
else
return true;}
</script>

But its not working, what else would i need.


Also i need help with another thing, there are 2 password boxes, one for your password and one for confirm password, how would i make it so they have to match, does it have something to do with variables? can anyone help me?

StupidRalph
07-06-2007, 12:39 PM
Try posting this in the javascript forum as they can better suite your needs there. Also you might want to post your <html> form for so they can see your password and confirm password names or index.

mlse
07-06-2007, 12:44 PM
Hi there ... I suggest you repost in the javascript forum and post the HTML too (all you've got there is the javascript).

fl00d
07-06-2007, 05:34 PM
What the other two said ^^

As for password confirmation, you could use an if statement.

<?php
$password = $_POST['password']; //transferred from html form where the password field is called password
$confirm_password = $_POST['confirm_password']; //transferred from form where confirm password field is called confirm_password

if($password != $confirm_password) {
echo "Passwords do not match!";
}else{
proceed with whatever you want to happen here
}
?>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum