On Wed, 28 May 2003 at 01:00, Nicholas Davey opined:

[snip]
ND:http://www.blah.com/cgi-bin/index.cgi?login=yes (DONT go here, example only)
ND:
ND:#!/usr/bin/perl
ND:
ND:[ output HTML headers and top of page here ]
ND:
ND:if (login eq 'yes') {
ND:    [ output login form here ]
ND:}
ND:
ND:[ output bottom of page here ]
ND:
ND:When I pass the variable in the URL like this, the if statement doesnt
ND:trigger. However, when I run this on my RH box as a script, it will parse
ND:the variable just fine and output the correct HTML to my console.

hi nicholas - first, a tip.  if it deals w/ cgi, don't cross-post to the 
beginners perl list.  beginners-cgi is the correct place for this 
question.

as for your problem, i don't see any code in there to pull the login 
key-value pair.  so try something like this:

use strict;
use CGI;

my $cgi = new CGI;  # construct a reference to the CGI object
my $login = $cgi->param('login');  # get the value of 'login'

if ($login eq 'yes') {
  # do something
}

etc.....


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to