I am trying to send a value to a page using this script:
The problem is I cant get the field {option1|verse} to work.
Is this because it is ilegal in the pearl language or is my script to baisic.
I need to use this as a field because its for a shopping cart and they need it to be passed to them using this field.
I have tried just {option1} and that works fine but when i add the | nothing happens.
Does anyone know a way around this or if I use a diffrent handling script will it work.
Thank you
Grant
Code:
#!/usr/bin/perl
read(STDIN,$temp,$ENV{'CONTENT_LENGTH'});
@pairs=split(/&/,$temp);
foreach $item(@pairs)
{
($key,$content)=split(/=/,$item,2);
$content=~tr/+/ /;
$content=~s/%(..)/pack("c",hex($1))/ge;
$fields{$key}=$content;
}
print "Content-type: text/html\n\n";
print "<HTML>\n";
print "<BODY BGCOLOR=#FFFFFF>\n";
print "<CENTER>\n";
print "$fields{option1|verse}<BR>\n";
print "$fields{option1}<BR>\n";
print "</CENTER>\n";
print "</BODY></HTML>";
The problem is I cant get the field {option1|verse} to work.
Is this because it is ilegal in the pearl language or is my script to baisic.
I need to use this as a field because its for a shopping cart and they need it to be passed to them using this field.
I have tried just {option1} and that works fine but when i add the | nothing happens.
Does anyone know a way around this or if I use a diffrent handling script will it work.
Thank you
Grant