Gossamer Forum
Quote Reply
Cookies session mod
Hi!

Is it that much hard to have just a small routine on every CGI I want to add this feature to (not just Links CGI's) that would check if a cookie exist and if not, take the user to the login/registration page?

User data would be stored into a separate database, no matter if it's ASCII or MySQL, I don't care. I would just like to include a call to this login checker from any CGI I want to include the call to (either Links CGI or not).

AFAIK, this would not affect Links whatsover... I mean, I don't see the need for an upgrade 2 LinksSQL.

LMK, please.

Thanks!



Quote Reply
Re: Cookies session mod In reply to
Hi,

What will happen if user's browser is not enable cookie?

Cheers,



Tandat

Software Developer.
Quote Reply
Re: Cookies session mod In reply to
Same as with any site that requires cookies.

In basic format all you'd need is.......

use CGI qw(:standard);

my $in = new CGI;

$in->cookie('Cookie') ? &ok : &login;

sub ok would then need to verify the cookie contents against your database. sub login would call the login page.

Mods:http://wiredon.net/gt/download.shtml
Installations:http://wiredon.net/gt/