Hi All,

On my login page, for some reason the login file will not recognize the correct login number as supplied by the admin file as it should. It continually says login failed, please try again.
Can anyone see where the code may be going awry. Any help would be appreciated.

login.php file reads;

<?php

session_start();
$_SESSION["loggedin"] = false;
require("admin_1.php");

if ($_REQUEST["submit"]) {
if ($_REQUEST["username"] == $adminUsername && md5($_REQUEST["password"]."phpCart") == $adminPassword){
$loggedin = true;
session_register("loggedin");
$_SESSION["loggedin"] = true;
header("Location: index.php");
exit();
}
else
$errormessage = "Login failed, please try again.<br>\n";
}
require("hf.php");
pageHeader();
echo $errormessage;
?>
<form action='login.php' method='post'>
<div align='center'>
<center>
<table border='0' cellpadding='0' cellspacing='8' width='55%'>
<tr>
<td width='59%'><font size='2' face='Verdana'>Login Username/font></td>
<td width='41%'><input type='text' name='username' size='20' value='<? echo $_REQUEST["username"]; ?>'></td>
</tr>
<tr>
<td width='59%'><font size='2' face='Verdana'>Password/font></td>
<td width='41%'><input type='password' name='password' size='20'></td>
</tr>
<tr>
<td width='100%' colspan='2'>
<p align='center'><input type='submit' name='submit' value='Login'></p>
</td>
</tr>
</table>
</center>
</div>
</form>
<?
pageFooter();
?>

admin_1.php file which is called reads;

<?php
$adminUsername = "admin";
$adminPassword = "admin";
?>

Thanks