View Full Version : little line of code to add - PlEaSe!!

09-02-2002, 01:08 PM
Can someone please tell me what i need to add here to make my keys come out in the order i want (like a template) ?? i have no idea !

as the following :

#(c) 2002 reubenb

use CGI;
$query = new CGI;

open (PROFILE_OUTPUT, ">> profiles.txt") or die "Can't open profiles.txt";

print $query -> header;

#copy query_string into new variable
$form_info = $ENV{'QUERY_STRING'};

@input_pairs = split (/[&;]/, $form_info);

%input = ();
foreach $pair (@input_pairs) {
$pair =~ s/\+/ /g;

($name, $value) = split(/=/, $pair);

$name =~ s/%([A-Fa-f0-9]{2})/pack("c", hex($1))/ge;
$value =~ s/%([A-Fa-f0-9]{2})/pack("c", hex($1))/ge;

$input{$name} = $value;

print "<html><head><title>Profiles</title></head><body>\n";
print "<H1></H1>\n";

foreach $key (keys %input) {
print PROFILE_OUTPUT "$key : $input{$key}";
print PROFILE_OUTPUT "\n";

#print $query->redirect('thankyou.html');

open (INPUT, "< thankyou.html") or die "can't open thankyou.html";
while (<INPUT>) {
close INPUT;

print "</body></html>\n";

exit;:eek: :eek: :eek: :eek: :eek: :eek: :rolleyes: :mad: