Hi Guys,
I am new to CGI::App, so please bear with me..
I need to knock up a web app that allows read access to our database..
Its protected by SSL, and I am using CGI::Session (without cookies, I'm
using the id attached to all links and as form fields in the run modes...)
My problem is very likely a dumb one.. but I'm new at this, so its to be
expected I guess..
I have a login runmode and a menu runmode.. (I'm using HTML::Template too if
that makes any difference.)
the login mode (mode_1) prints out a form for username/password and points
back to the script with mode_2 as a hidden field.
In mode_2, the I want to process the login, and if its successful, I would
like to display the menu, no problem, if the login failed.. I want to go
back to the login page..
How do I do that? I know how to do an if/elsif test, but how do I direct
back to the login field??
Oh, one other thing.. I am using cgiapp_prerun to test if the cgi session
exists. or if the login mode has been displayed and if not, to display the
login mode again.
like so:
sub cgiapp_prerun
{
my $self = shift;
my $form_parameters = $self->query();
my ($user_id, $session) = get_ID($form_parameters);
unless (($form_parameters->param('seen_login_page') ||
($session->param("logged_in"))
{
$self->prerun_mode('mode_1');
}
I guess my question is this:
How can I achive the same results as $self->prerun_mode('mode_1');
inside a normal runmode? in other words, how can I use the menu runmode code
to send the person back to the login screen if they have entered an
incorrect username/password?
Any tips would be fantastic and much appreciated.
kindest regards
Frank
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/suppressed/
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.