>> but the two "keyword" variables are completely unrelated.
Not sure what you mean? I know they are separate, which means the elsif is
unaffected by the other... if I understand. I'll send you the file attached
if you want.
But here's the parse_input subroutine:
sub parse_input
{
if ($ENV{'REQUEST_METHOD'} eq 'POST')
{
read(STDIN,$temp,$ENV{'CONTENT_LENGTH'});
} else
{
$temp=$ENV{'QUERY_STRING'};
}
@pairs=split(/&/,$temp);
foreach $item(@pairs)
{
($key,$content)=split (/=/,$item,2);
if($content eq '')
{
$keyword{$key}="\0";
} else
{
$content=~tr/+/ /;
$content=~ s/%(..)/pack("c",hex($1))/ge;
if (!defined($keyword{$key}))
{
$keyword{$key}=$content;
} else
{
$keyword{$key} .= "\0$content";
}
}
}
}
-----Original Message-----
From: Jenda Krynicky [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 24, 2002 11:28 AM
To: [EMAIL PROTECTED]
Subject: Re: Elsif and problems
From: "Bradley J. Seward" <[EMAIL PROTECTED]>
> I'm not sure as to proper naming scheme, so bear with me...
>
> When I parse my input line, the url thingy,
> http://www...stuff....cgi?newuser, the if statement works and jumps to
> the correct subroutine which displays an html page with a form. When
> this form is submitted it goes to http://www...stuff....cgi?saveuser,
> howeever when parsed it never reaches its elsif statement. Here's an
> excerpt:
>
>
> &parse_input($keyword);
>
> &print_header;
>
> if ($keyword{'newuser'})
Sorry to bother
The parse_input() function gets a scalar variable $keyword, the
$keyword{'newuser'} accesses the hash variable %keyword.
Since you did not include the definition of parse_input() nor the
name of the module you import it from we cannot say anything more.
Except that ... you should
use CGI;
Jenda
=========== [EMAIL PROTECTED] == http://Jenda.Krynicky.cz ==========
There is a reason for living. There must be. I've seen it somewhere.
It's just that in the mess on my table ... and in my brain
I can't find it.
--- me
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]