in reply to Re: Re: Warning Messages
in thread Warning Messages

What he means is that if you are running this script locally on your machine, and not through a web server, the environment variables you are trying to use may not be there meaning they are undefined. Try running them through a server and see if you have the same problem.

-----------------------------------
Washizu
The best offense is a good offense.

Replies are listed 'Best First'.
Re: Re: Re: Re: Warning Messages
by Anonymous Monk on Nov 19, 2001 at 19:12 UTC
    Thanks..I fixes all except the read line, any ideas how i can fix that ?
      Hi All, I am having real problems sorting out the read( ) line, as it keeps bringing up a unititialized error message - I desperately need to fix this ... is there any way ?

      For the $ENV{'QUERY_STRING'} error I enclosed that in a if ($ENV{'QUERY_STRING'}) { <<>> } tag ...Please let me know if there is any way I can fix the read
        Yes, do not attempt to read from $ENV{'QUERY_STRING'} if it is not defined. Change that line to:
        if (defined $ENV{'QUERY_STRING'}) { # assign to variable # check for login parameter }
        I'd like to echo davorg's update, though, and suggest you use CGI.pm instead:
        use CGI; my $q = CGI->new(); my $age = $q->param('age'); my $login = $q->param('login'); if ($age) { # do whatever } if ($login) { # do whatever }
        With a mighty WHOMP!, these visible warnings (and several invisible problems probably lurking in your CGI parser) will automagically disappear.