hello
I have a table with the columns one, two and three. I am looking for logic for a page before it loads go and check if the person is in database, the home page should show up if not an error page should come up.
Logic to block the unauthorized user
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.


Shweta LodhaRank #31 · 39.8K reputationPosted Nov 19, 2014, 6:46 AM EST
You can execute your validation logic on your login form's button click. In case of invalid login details, you can redirect the user to error page.
Wim SturkenboomRank #2,527 · 554 reputationPosted Nov 19, 2014, 6:57 AM EST
In the login page, you can validate (as indicated by Shweta) and set a session variable to indicate that the user is valid; if the user is valid, you can redirect to the page where he/she came from.
Shweta LodhaRank #31 · 39.8K reputationPosted Nov 20, 2014, 6:17 AM EST
Did you get your answer?