Hello,
I created a simple login script, taht has a hard coded user/pass. Yet for some reason it will not work, keeps redirecting to the main login page
Here is the code
Login Page
<table width='400' border='0' align='center' cellpadding='0' cellspacing='0'>
<tr>
<td>UserName:</td>
<td><form action="loginscript.php" method="post"> <input name="username" type="text" size="10"></td>
</tr>
<tr>
<td>Password:</td>
<td><input name="password" type="password" size="10"></td>
</tr>
<tr>
<td colspan='2' align='center'><input name="Submit" type="submit" value="Submit"></form></td>
</tr>
</table>
Login Script
<?php
session_start();
$pass = strtolower($_POST['password']);
$name = strtolower($_POST['username']);
if($name == "test" && $pass == "test"){
header ("location: select.php");
}
else{
// invalid login, so go back ...
header ("location: index.php");
}
?>
Select.php
<?php
session_start();
if(isset($_SESSION['myuser'])){
}
else{
header ("location: index.php");
}
?>
ANy ideas why it is not working. It doesnt seem like it is going through the login on the loginscript as all it does is redirect back to index page over and over again