Hello. I am following a tutorial for a simple registration form but i don’t seem to be receiving the correct errors when i’m testing. I can’t seem to find where my code has gone wrong. Could someone kindly point me in the right direction please? Thanks
[php]<?php
echo “
Register
”;$submit = $_POST[‘submit’];
$fullname = strip_tags($_POST[‘fullname’]);
$username = strip_tags($_POST[‘username’]);
$password = strip_tags($_POST[‘password’]);
$reapeatpassword = strip_tags($_POST[‘repeatpassword’]);
$date = date(“Y-m-d”);
if($submit)
{
if ($fullname&&$username&&$password&&$repeatpassword)
{
if ($password==$repeatpassword)
{
if (strlen($username)>64||strlen($fullname)>64)
{
echo “Length Of Username Or Fullname Is Too Long!”;
}
else
{
if (strlen($password)>128||strlen($password)<12)
{
echo “Password Must Be Between 12-128 Characters”;
}
else
{
$password = md5($password);
$repeatpassword = md5($repeatpassword);
echo "Success!!";
}
}
}
else
echo "Your Passowrds Do Not Match!";
}
else
echo “Please fill in all fields!”;
}
?>[/php]
[code]
Your full name: | |
Choose A Username: | |
Choose A Password: | |
Repeat Your Password: |
[/code]