in reply to Session Problems

Hello

im not familiar with mason either
but i did take four hours a weekend ago to actually understand session
here is a db enabled testscript
you can run this like
perl sessiontest.pl
perl sessiontest.pl get_id=*sessionid*
or
perl sessiontest.pl visa_number=1234566

first one set a session second grabs the session and
third sets a session with the visa number
#!/usr/bin/perl use strict; use Apache::Session::Postgres; use CGI; my $driver = "Pg"; my $dbname = "database"; my $host = "127.0.0.1"; my $user = "user"; my $password = "password"; my $dbh = DBI->connect( "dbi:$driver(PrintError=>1,RaiseError=>1,Taint=>1):dbname=$dbname;host +=$host", $user, $password ); my $q = CGI->new; my $id = $q->param('get_id'); my $visa_number = $q->param('visa_number'); tie my %hash, 'Apache::Session::Postgres', $id, { Handle => $dbh, }; if ( !$id && $visa_number ) { $hash{visa_number} = $visa_number; } use Data::Dumper; print Data::Dumper->Dump( [%hash] );
back in the day we didnt have no old school