Using Sessions to save Parameters

Using Sessions to save Parameters

am 31.07.2007 21:13:00 von Ben Eagle

I am trying to save parameters being passed from Flash,
Flash is sending parameters using GET and there are too many to send all
of them so I must split them into 3 different GET.

so I am using Perl and CGI::Session to save the parameters, and then
loading back up and saving all of the parameters to a Hash.

I can't seem to get it to properly work, I am not really familure with
sessions, so I have been reading up on them, yet still not proficient.

I can't use POST because flash projector files automatically use GET no
matter what you declare. As a security precaution.

here is the code I am using:

#!/usr/bin/perl -w

BEGIN {
use CGI::Carp qw(carpout);
open(\*MYLOG, '>>', "sessions.log") or
die("Unable to open perl.log: $!\n\n");
carpout(MYLOG);
}

use CGI;
use CGI::Session;
use strict;

my $q = new CGI;
print $q->header( "text/html" );
my $session = new CGI::Session() or die CGI::Session->errstr;



my %valueHash;

GrabParams();

foreach(%valueHash){
print $_."
";
}

#push %valueHash, %{$session->param('valueHash')};

$session->save_param(%valueHash);



sub GrabParams{
my ( $paramName, $paramValue);
foreach $paramName ($q->param) {
foreach $paramValue ($q->param( $paramName )) {
$valueHash{ $paramName } = pack 'U0A*',
$paramValue;
}
}
}

any help on the best way to accomplish this would be appreciated.
thanks
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs