monkeybidz Posted September 16, 2007 Share Posted September 16, 2007 I am trying to get redirected after login, but don't have a clue. This is what i have so far: if (!isset($_SESSION["userid"])) { header ("Location: signin.php"); exit; } This code is on a page named profile.php Any help is good! ??? Quote Link to comment Share on other sites More sharing options...
Jessica Posted September 16, 2007 Share Posted September 16, 2007 and what is the problem? Quote Link to comment Share on other sites More sharing options...
monkeybidz Posted September 16, 2007 Author Share Posted September 16, 2007 So far this code just checks if the session user is logged in or not, if not the user is sent to signin.php. After signin.php the user is not redirected back to profile.php. Quote Link to comment Share on other sites More sharing options...
Jessica Posted September 16, 2007 Share Posted September 16, 2007 Where are you telling it to go to profile.php? You're not making much sense to me. Quote Link to comment Share on other sites More sharing options...
ScSpruijt Posted September 16, 2007 Share Posted September 16, 2007 You will have to do that on the signup.php file. After you submit the form there, you can process the data and redirect back to the index. I suppose that's what you mean. Quote Link to comment Share on other sites More sharing options...
monkeybidz Posted September 16, 2007 Author Share Posted September 16, 2007 It is supposed to return to profile.php or whatever page i put the code in. This is why i need help. I don't know where or how to tell it to return. The page signin.php is also used by all other pages. Is there a way i can make signin.php return you to your previous page after login? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.