Gossamer Forum
Home : Products : DBMan : Customization :

Re: [RedRum] Passing values in the URL

Quote Reply
Re: [RedRum] Passing values in the URL In reply to
Hmm, been doing some thinkg (!). Could it be that the code I use for grab and format the method=get values mess this up?:



sub get_data {
#######################################################################################
local($string);
# get data
if ($ENV{'REQUEST_METHOD'} eq 'GET') {
$string = $ENV{'QUERY_STRING'};
}
else { read(STDIN, $string, $ENV{'CONTENT_LENGTH'}); }
# split data into name=value pairs
@data = split(/&/, $string);
# split into name=value pairs in associative array
foreach (@data) {
split(/=/, $_);
$_[0] =~ s/\+/ /g; # plus to space
$_[0] =~ s/%0D%0A%0D%0A/\n\n/g; #added by kristina make newlines?
$_[0] =~ s/%0a/newline/g;
$_[0] =~ s/\%00//g;
$_[0] =~ s/%(..)/pack("c", hex($1))/ge; # hex to alphanumeric
if(defined($data{$_[0]})){
$data{$_[0]} .= "\0";
$data{$_[0]} .= "$_[1]";
}
else {
$data{"$_[0]"} = $_[1];
}
}
# translate special characters
foreach (keys %data) {
$data{"$_"} =~ s/\+/ /g; # plus to space
$data{"$_"} =~ s/%(..)/pack("c", hex($1))/ge; # hex to alphanumeric
$data{"$_"} =~ s/\%00//g;
}
%data; # return associative array of name=value
#######################################################################################
}
Subject Author Views Date
Thread Passing values in the URL eric74 10157 Jan 29, 2002, 10:55 AM
Thread Re: [eric74] Passing values in the URL
kellner 9627 Jan 29, 2002, 11:39 AM
Thread Re: [kellner] Passing values in the URL
chmod 9550 Jan 29, 2002, 12:27 PM
Post Re: [chmod] Passing values in the URL
eric74 9395 Jan 30, 2002, 9:01 AM
Thread Re: [kellner] Passing values in the URL
eric74 9474 Jan 30, 2002, 9:02 AM
Thread Re: [eric74] Passing values in the URL
kellner 9535 Jan 30, 2002, 2:48 PM
Thread Re: [kellner] Passing values in the URL
Paul 9491 Jan 30, 2002, 2:53 PM
Post Re: [RedRum] Passing values in the URL
eric74 9450 Jan 31, 2002, 4:21 AM
Thread Re: [RedRum] Passing values in the URL
eric74 9563 Feb 6, 2002, 6:00 AM
Thread Re: [eric74] Passing values in the URL
Paul 9430 Feb 6, 2002, 7:01 AM
Thread Re: [RedRum] Passing values in the URL
eric74 9429 Feb 6, 2002, 10:13 AM
Thread Re: [eric74] Passing values in the URL
eric74 9425 Feb 6, 2002, 11:38 AM
Thread Re: [eric74] Passing values in the URL
Paul 9531 Feb 6, 2002, 11:43 AM
Thread Re: [RedRum] Passing values in the URL
eric74 9468 Feb 6, 2002, 11:53 AM
Thread Re: [eric74] Passing values in the URL
Paul 9526 Feb 6, 2002, 11:56 AM
Thread Re: [RedRum] Passing values in the URL
eric74 9475 Feb 6, 2002, 12:00 PM
Thread Re: [eric74] Passing values in the URL
Paul 9414 Feb 6, 2002, 12:03 PM
Thread Re: [RedRum] Passing values in the URL
eric74 9437 Feb 6, 2002, 12:08 PM
Post Re: [eric74] Passing values in the URL
Paul 9422 Feb 6, 2002, 12:12 PM
Thread Re: [eric74] Passing values in the URL
Paul 9472 Feb 6, 2002, 12:15 PM
Thread Re: [RedRum] Passing values in the URL
eric74 9389 Feb 7, 2002, 5:42 AM
Thread Re: [eric74] Passing values in the URL
Paul 9433 Feb 7, 2002, 6:18 AM
Thread Re: [RedRum] Passing values in the URL
eric74 9589 Feb 7, 2002, 9:12 AM
Thread Re: [eric74] Passing values in the URL
Paul 9468 Feb 7, 2002, 9:30 AM
Thread Re: [RedRum] Passing values in the URL
eric74 9416 Feb 7, 2002, 10:01 AM
Thread Re: [eric74] Passing values in the URL
Paul 9004 Feb 7, 2002, 11:14 AM
Thread Re: [RedRum] Passing values in the URL
eric74 9078 Feb 7, 2002, 12:12 PM
Thread Re: [eric74] Passing values in the URL
Paul 9086 Feb 8, 2002, 4:23 AM
Thread Re: [RedRum] Passing values in the URL
eric74 9069 Feb 8, 2002, 4:45 AM
Thread Re: [eric74] Passing values in the URL
Paul 9019 Feb 8, 2002, 4:48 AM
Thread Re: [RedRum] Passing values in the URL
eric74 9034 Feb 8, 2002, 5:20 AM
Thread Re: [eric74] Passing values in the URL
Paul 9146 Feb 8, 2002, 5:52 AM
Thread Re: [RedRum] Passing values in the URL
eric74 8949 Feb 8, 2002, 6:03 AM
Thread Re: [eric74] Passing values in the URL
Paul 9078 Feb 8, 2002, 6:13 AM
Thread Re: [RedRum] Passing values in the URL
eric74 9011 Feb 8, 2002, 8:29 AM
Thread Re: [eric74] Passing values in the URL
Paul 9066 Feb 8, 2002, 8:33 AM
Thread Re: [RedRum] Passing values in the URL
eric74 9042 Feb 8, 2002, 8:39 AM
Thread Re: [eric74] Passing values in the URL
Paul 8983 Feb 8, 2002, 8:45 AM
Thread Re: [RedRum] Passing values in the URL
eric74 9016 Feb 8, 2002, 9:05 AM
Thread Re: [eric74] Passing values in the URL
Paul 9004 Feb 8, 2002, 9:06 AM
Thread Re: [RedRum] Passing values in the URL
eric74 8962 Feb 22, 2002, 9:53 AM
Thread Re: [eric74] Passing values in the URL
Paul 8965 Feb 22, 2002, 10:33 AM
Thread Re: [RedRum] Passing values in the URL
eric74 8947 Feb 24, 2002, 5:32 AM
Thread Re: [eric74] Passing values in the URL
Paul 8987 Feb 24, 2002, 6:14 AM
Thread Re: [RedRum] Passing values in the URL
eric74 8968 Feb 24, 2002, 6:36 AM
Thread Re: [eric74] Passing values in the URL
Paul 8915 Feb 24, 2002, 6:55 AM
Thread Re: [RedRum] Passing values in the URL
eric74 8884 Feb 24, 2002, 3:09 PM
Post Re: [eric74] Passing values in the URL
Paul 8893 Feb 25, 2002, 12:56 PM