hey, i have been working on getting a login script working, but always get an error. Here is my code:
PHP Code:
<?php
if (($_POST['username']=="")) {
echo"
<html>
<title>Login Page</title>
<body>
Please fill out the form below to acces that page
<form method=\"post\" action=\"process.php\">
Username: <input type=\"text\" name=\"username\" />
<br />
Password: <input type=\"text\" name=\"password\" />
<br />
<input type=\"button\" value=\"Submit\" />
</form>
</body>
</html>";
} else {
$username = $_POST['username'];
$passowrd = $_POST['password'];
session_start();
if ($username == "kyle" && $password == "price") {
$permission == "yes"
$username = $_POST['username'];
session_register("permission");
session_register("username");
if ($permission == "yes") {
echo"
<html>
<title>Login Page</title>
<body>
You are now logged in, feel free to navigate the protected pages
<br />
<a href=\"page1.html\">Page 1</a>
<br />
<a href=\"page2.html\">Page 2</a>
</body>
</html>";
} else {
echo "The username or password you entered was incorrect, please retry.";
}
?>
the error i get is this "Parse error: syntax error, unexpected T_VARIABLE in /home/echodesi/public_html/testing/login/test1.php on line 27"
I would appreciate any help
Bookmarks