ok - on a successful login are you setting the cookie? You will need to do this. You need to think about how long you want the cookie to last before expiring etc...
Below is an example of setting a cookie which is valid for 1 hour.
setcookie ("CookieName", $CookieValue,time()+3600);
/* I generally use UserName[SiteName] for my cookie name and the CookieValue would be the persons username so if your username login field was called "Username" this would be $Username and the time()+3600 means make the cookie valid for the next hour.
From this your setcookie line would be setcookie ("UserNameYOURSITE", $Username, time()+3600); */
Then when a person logs out, re-direct them to your login page, and use the following line for your Username field...
if(isset($_COOKIE[UserNameYOURSITE]))
{
$UserName = $_COOKIE[UserNameStaffUserNameYOURSITE];
echo <input type=\"text\" name=\"Username\" value=\"$UserName\">
}
else
{
echo <input type=\"text\" name=\"Username\">
}
This isn't tested so you may need to play with it a bit...I just threw it together. It may not even be the best solution, but it will work.