I've made a script that reads the value of sessionID from the form that posts to it. Like this:
&ReadParse;
$sessionID = $in{'sessionID'};
sub ReadParse {
local (*in) = @_ if @_; local ($i, $loc, $key, $val);
if ($ENV{'REQUEST_METHOD'} eq "GET") {
$in = $ENV{'QUERY_STRING'};
} elsif ($ENV{'REQUEST_METHOD'} eq "POST") {
read(STDIN,$in,$ENV{'CONTENT_LENGTH'}); }
@in = split(/&/,$in);
foreach $i (0 .. $#in) {
$in[$i] =~ s/\+/ /g;
($key, $val) = split(/=/,$in[$i],2);
$key =~ s/%(..)/pack("c",hex($1))/ge;
$val =~ s/%(..)/pack("c",hex($1))/ge;
$in{$key} .= "\0" if (defined($in{$key}));
$in{$key} .= $val; }
return 1;}
$loc = $loc;
If there is no value for sessionID then i want the script to redirect to a specified URL. can anyone tell me what sort of code i need to do this
any help would be much apprecited
cheers
linda