On 8/25/05 1:31 PM, "Will" <[EMAIL PROTECTED]> wrote: > Sean Davis wrote: >> On 8/15/05 9:36 AM, "Will" <[EMAIL PROTECTED]> wrote: >> >> >>> I've been playing around with CGIA and I really like what I see. I've >>> got some very simple apps under my belt, but now I'd like to build >>> something more robust. I will need to authenticate users and keep track >>> of them through my app ( and possibly other cgi-apps ). >>> >>> It's been quite some time since I've had to deal with sessions, and at >>> the time I rolled my own version before I really knew what sessions >>> were. Is there some sort of standardization, or best practices when it >>> comes to sessions and cgi-app specifically? >> >> >> Have you seen: >> >> http://search.cpan.org/~ceeshek/CGI-Application-Plugin-Session-0.08/lib/CGI/ >> Application/Plugin/Session.pm >> >> And here: >> >> http://cgiapp.erlbaum.net/cgi-bin/cgi-app/index.cgi?LoginLogoutExampleApp >> >> Hope these help, >> >> Sean >> >> >> --------------------------------------------------------------------- >> Web Archive: http://www.mail-archive.com/[email protected]/ >> http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2 >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > If someone clicks a link to app.pl?rm=edit and their session has > expired, is there a way to redirect them to rm=edit after they log in? > ( as opposed to them seeing the default rm after logging in) > > I'm just trying to wrap my head around all this stuff before doing any > coding.
Yep, but you need to store the "desired" run_mode in a hidden field on your login page. If you have something in pre-run that checks for "logged in", if a person isn't logged in and wants to get to rm edit, then you can just put a hidden field on your login page that is something like 'desired=edit'. Then, when you process the login, if the desired field is set, just redirect to that run mode. Make sense? Sean --------------------------------------------------------------------- Web Archive: http://www.mail-archive.com/[email protected]/ http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2 To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
