Its
<html>
<head>
</head>
<body>
<form action="adminact.php" method="post">
<table>
<tr>
<td>username: </td>
<td><input type="text" name="username"></td>
</tr>
<tr>
<td>password: </td>
<td><input type="password" name="password"></td>
</tr>
<tr>
<td><input type="submit" name="submit"></td>
</tr>
</table>
</form>
</body>
</html>
I made some changes, but its still buggy, with the post i get both true and false(if and else):
<?php
session_start();
$username = $_POST['username'];
$password = $_POST['password'];
if($username == "user" && $password == "pass") {
$_SESSION['user'] = $username;
$_SESSION['logged'] = "yes";
}
else {
print "username or pass was incorrect!";
}
if($_SESSION['logged'] == "yes") {
echo "you are now logged in!";
}
?>
its giving me username or pass was incorrect!you are now logged in!