ok my assignment is to make a login form that will accept a user name and password. if the user name and password don't match it doesnt do anything, but if it does it takes it to a website. my only problem is when i go to run it i get and error like this
Parse error: syntax error, unexpected $end in /home/bfinnegan/public_html/ta3.php on line 58...i dont know wat it means..need help please
<?php
$user="beatrice";
$pswrd="bean";
$redirect=false;
$max_attempts=false;
$num_attempts=(isset($_POST["num_attempts"])) ? $_POST["num_attempts"] + 1 : 0;
$username = (isset($_POST["username"])) ? $_POST["username"]: "";
if(!isset($_POST["username"]))
{ $msg="Welcome to the Cameron Page!";
}else if($_POST["username"]==$user && $_POST["password"]==$pswrd)//everything matches, move to webpage
{ $redirect=true;
$msg="";
}else if($num_attempts>10)//kicks user out of program
{ $msg="Exceeded the limit of tries.";
$max_attempts=true;
}else
{ $msg="Try again. Max number of attempts is 10";
}
$_POST["password"]="";
$guess=$_POST["guess"];
?>
<html>
<head>
<title>Welcome to Cameron</title>
</head>
<?php
if($redirection==true)
{
header("location:http://www.cameron.edu");
exit;
}
?>
</head>
<body>
<strong>
<?php echo $message ?>
</strong>
?>
<?php
if ($max_attempts==false)
{
echo "<form action= ".$_SERVER["PHP_SELF"];?> " method="POST"> ;
echo "User name :<br/><input type="text" name="username" value=".$username"><br/> ";
echo "Password : <br/><input type="password" name="password" value=''><br/> ";
echo "<input type="hidden" name="num_attempts" value=".$num_attempts"> ";
echo "</p> \n";
echo "<p><input type="submit" value="submit your guess"></p>";
}
?>
</form>
</body>
</html>