General Question

dotlin's avatar

Php logging in problems? learning php?

Asked by dotlin (422points) September 2nd, 2010

so it’s telling me
Parse error: syntax error, unexpected $end in C:\xampp\htdocs\loginsession\register.ph… on line 101

<?php
echo ”<h1>Register</h1>”;

$submit = $_POST[‘submit’];

//form data
$fullname= strip_tags($_POST[‘fullname’]);
$username= strip_tags($_POST[‘username’]);

$password= strip_tags($_POST[‘password’]);
$repeatpassword= strip_tags($_POST[‘repeatpassword’]);
$date = date(“Y-m-d”);

if ($submit)
{

//check for existance
if ($fullname&&$username&&$password&&$repea…
{
//encrypt password
$password = md5($password);
$repeatpassword = md5($repeatpassword);

if ($password==$repeatpassword)
{

//check char length of username and fullname
if (strlen($username)>25||strlen($fullname)…
{
echo “Length of username or fullname is too long! ”;
}
else
{

//check paswordlength
if (strlen($password)>25||strlen($password)…
{
echo “Password must be between 6 and 20 characters”;
}
else
{
//register the user!

echo “Success!!”;

}

}

}
else
echo “Your passwords do not match!”;

}

?>
<p>
<html>
<form action=‘register.php’ method=‘POST’>
<table>
<tr>
<td>
Your full name:
</td>
<td>
<input type=‘text’ name=‘fullname’>
</td>
</tr>
<tr>
<td>
choose a username:
</td>
<td>
<input type=‘text’ name=‘username’>
</td>
</tr>
<tr>
<td>
choose a pasword:
</td>
<td>
<input type=‘password’ name=‘password’>
</td>
</tr>
<tr>
<td>
Repeat your password:
</td>
<td>
<input type=‘password’ name=‘repeatpassword’>
</td>
</tr>
</table>
<p>
<input type=‘submit’ name=‘submit’ value=‘register’>
</form>
</html>

Observing members: 0 Composing members: 0

2 Answers

phaedryx's avatar

It means that it got to the end of the file and was expecting a ”}” and didn’t find one. Quick count of your braces:

{ = 7
} = 6

Yup, you’ve got a mismatch.

Zyx's avatar

@dotlin “unexpected” basically always means you forgot a brace or a semicolon or something. These are the problems you should be solving yourself, so don’t make a habit of asking.

Answer this question

Login

or

Join

to answer.

This question is in the General Section. Responses must be helpful and on-topic.

Your answer will be saved while you login or join.

Have a question? Ask Fluther!

What do you know more about?
or
Knowledge Networking @ Fluther