You can't redirect to one page if successful and another if unsuccessful, they need to be the same page built in such a way that it only shows the content you want to people who are logged in and an error message or such to those who aren't. If you did it the way you are suggesting then people could just bookmark or send links to people already past the login page and nothing would stop people who haven't logged in from seeing it.
|