Jump to content

PARSE error


desjardins2010

Recommended Posts

<?php

echo "<h1>Register</h1>";

$submit =$_POST['submit'];

//form data
$fullname =strip_tags($_POST['fullname']);
$email =strip_tags($_POST['email']);
$username =strip_tags($_POST['username']);

$password =strip_tags($_POST['password']);
$password2 =strip_tags($_POST['password2']);

if ($submit) 

{

if ($fullname&&$email&&$username&&password&&password2)
{
//setting md5 standard
$password = md5($password);
$password2 = md5($password2);

//check to see if the passwords match
if (strlen($password==$password2)
{
//check char length of username and fullname
if (strlen($username)>25||strlen($fullname)>25)
{
else
echo "Your Username or Fullname is above the 25 character limit";

}
else
{
//check that password is larger than 6 chars and smaller than 25
if (strlen($password)>25||strlen($password)<6)
{
echo "Your password must be 6-25 characters in lenght!";
}
else
{

//register user


}
}
{
else {
echo "The passwords entered do not match";
}

}
else
echo "Please fill in <b>all</b> spaces provided";
}

?>


<html>
<p>
<form action='register.php' method="post">
<table>

<tr>
    	<td>
    	Your Full Name:
        </td>
        <td>
        <input type="text" name="fullname">        
        </td>
    </tr>
    	<tr>
    	<td>
    	Email Address:
        </td>
        <td>
        <input type="text" name="email">        
        </td>
    	<tr>
    	<td>
    	Choose Username:
        </td>
        <td>
        <input type="text" name="username">        
        </td>
    </tr>
    	<tr>
    	<td>
    	Password:
        </td>
        <td>
        <input type="password" name="password">        
        </td>
    </tr>
    	<tr>
    	<td>
    	Retype Password:
        </td>
        <td>
        <input type="password" name="password2">        
        </td>
    </tr>
</table>
<p>
<input type="submit" name="submit" value="Register">
</form>

Link to comment
https://forums.phpfreaks.com/topic/221068-parse-error/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.