in reply to How do I Implement a One-Click Login Screen on the Web?
In your "else" clause, instead of creating another form ("click here to continue", etc.), just issue a redirect (which goes to the same place your button-click takes you.)
However - there's a big problem with the way you're doing this - you're not storing the login state into a session variable. Since HTML is stateless, once someone moves past your login page, you'll have no way of remembering whether they're logged in or not. If you don't store that state somewhere, and check it on every page, then people can leap-frog your login page and get to any page they want.
Here's a link to a simple login tutorial I wrote: RFC: Proposed tutorial - simple login script using CGI::Application
That should help get you started.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: How do I Implement a One-Click Login Screen on the Web?
by rbhyland (Acolyte) on Nov 22, 2011 at 20:21 UTC | |
by scorpio17 (Canon) on Nov 22, 2011 at 21:23 UTC | |
by Anonymous Monk on Nov 22, 2011 at 20:49 UTC |