I have a login page where the user enters a username and password. This is then passed to an authentication script that checks the username and password in a database, if they both match then it registers the usertype variable and redirects them on to another page.
session_start();
$usertype = "j";
session_register("username");
session_register("usertype");
session_register("person_id");
The page it gets redirected to then checks that the usertype and person_id is registered and then displays the contents otherwise it sends them back to the logon page.
Sometimes when you logon it redirects then the page sends the user back to logon, if you logon again it works fine. Any ideas/advice?
Many thanks