Hi im new to php, so can some body help me out with this code? "Parse error: syntax error, unexpected $end in E:\EasyPHP-5.3.2i\www\Survey\register.php on line 79"
<html>
<?php
if (isset($_POST['button'])) {
if ($button)
{
// get data
$username = $_POST['username'];
$password = $_POST['password'];
$retypepassword = $_POST['password'];
$email = $_POST['email'];
if($username && $password && $retypepassword && $email)
{
if ($password == $retypepassword)
{
if (strstr($email, "@") && strstr($email, "@"))
{
include ("connect.php");
$query = mysql_query ("SELECT * FROM users WHERE username='$username'");
$numrows = mysql_num_rows($query);
if ($numrows == 0)
{
$password = md5($password);
$register = mysql_query("INSERT INTO users VALUES ('', '$username', '$password' '$email')");
echo "You have been registered.";
}
else
echo "That username is taken";
}
else
echo "Not a valid email";
}
else
echo "Passwords did not match";
}
else
echo "You did not fill in every field";
}
else
{
echo "
<form action'register.php' method='POST'>
<table width='500'>
<tr>
<td align='right'>Username:</td>
<td align='left'><Input type='text' name='username'></td>
</tr>
<tr>
<td align='right'>Password:</td>
<td align='left'><Input type='password' name='password'></td>
</tr>
<tr>
<td align='right'>Retype Password:</td>
<td align='left'><Input type='password' name='retypepassword'></td>
</tr>
<tr>
<td align='right'>Email:</td>
<td align='left'><Input type='text' name='email'></td>
</tr>
<tr>
<td align='right'></td>
<td align='left'><Input type='submit' name='button' value='Register'></td>
</tr>
</table></form>
";
}
?>
</html>