I am trying to make sure that when people enter a password and re-type it, it is the same password.
Here is the code:
When I test it and put different passwords in it sends me to validate.php
Here is the code:
PHP:
<html>
<head>
</head>
<body>
<table>
<tr>
<td>Username:</td><td><input name=user></td>
</tr>
<tr>
<td>Password:</td><td><input type="password" name=pass1></td>
</tr>
<tr>
<td>Re-type Password:</td><td><input type="password" name=pass2></td>
</tr>
<tr>
<td></td><td><input type="submit" value="Register"></td>
</tr>
</table>
<?
$pass1=$_GET['pass1'];
$pass2=$_GET['pass2'];
if ($pass1==$pass2){
header("location:validate.php");
}
else{
echo ('The passwords you have entered do not match, please re-type them again');
}
?>
</body>
</html>
When I test it and put different passwords in it sends me to validate.php
Last edited: