PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
File auth.php validates vars submitted by form from different pages and validates user. I want it to redirect immediately after validation back to that page where vars were submitted.
i mean i need to determine where tahat post came from. Say if u logged in at page called index01.php, the auth.php should move you back to index01.php after validation with, or without error messages. Same goes for any other page. Login check and form are a function, which is called at every page. So i cannot just put one page to header()-function, therefore it would always redirect to same page regardless of the page u came from.
there's a little flaw with that one... when it redirects back, the target page still throws login form 'cause page has not refreshed, and therefore couldn't yet access session vars set by auth.php (like $_SESSION['login'] = true). It would be a little bit confusing for user.