I have an area on my site where users can log-in (after registration) and edit their profile using a form.
I use sessions to check wether users have logged in:
session_start();
// check to see if logged in
global $ok_user;
if (session_is_registered("ok_user"))
{
}
else
{
header("Location: http://www.domian.com/login.php");
exit;
}
not much to it...THE PROBLEM arises when they have submitted the form and there are errors found. My form validation script has a back button which would take them back to the form where they can amend their entries. However, when they press back, the form clears itself automatically and they have to re-enter everything from scratch!!
when I removed the session_start(); action from the form, the form worked fine when the back button is pressed...
Can anyone advise me on how I can get round this or if I am doing something wrong!
I hope this makes sense.
F