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 am using flash projector file so POST is not permitted as a security precaution (adobe) well I got the parameters being passed to save in the session but I am having difficulty loading the parameters up again and pushing the loaded parameters to the new parameters passed in a hash, not sure if I am totally getting the concept. I can save the parameter to the session file just fine, but when I try and load them up it won't load the old parameters. Then I try to add the new parameters passed to the saved session and it doesn't add the new values to the old values like I am needing, Any Ideas? use CGI; use CGI::Session; use strict; my $q = new CGI; print $q->header( "text/html" ); my %valueHash; my %newHash; GrabParams(); my $session; if ($valueHash{"sessPass"} == 1) { $session = new CGI::Session(undef, undef, {Directory=>'tmp/sessions'}) or die CGI::Session->errstr; printf("SessionID: %s <br>", $session->id ); }else{ $session = new CGI::Session($valueHash{"session"}) or die CGI::Session->errstr; #$session->param('valueHash', \%valueHash); while (my($k, $v) = each($session->param("valueHash"))) { $newHash{$k} = $v; printf("<br>key: %s value: %s", $k, $v); } } foreach my $name (keys(%newHash)) { foreach my $value ($newHash{$name}) { $valueHash{$name} = $value; } } foreach(%valueHash){ printf ("<br> %s ", $_); } $session->param('valueHash', \%valueHash); #printf("<br>hash: %s", %{$session->param("valueHash")}); sub GrabParams{ my ( $paramName, $paramValue); foreach $paramName ($q->param) { foreach $paramValue ($q->param( $paramName )) { $valueHash{ $paramName } = pack 'U0A*', $paramValue; } } } _______________________________________________ Perl-Unix-Users mailing list Perl-Unix-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs