Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: CGI problem

by Anonymous Monk
on Nov 06, 2011 at 04:54 UTC ( [id://936234]=note: print w/replies, xml ) Need Help??


in reply to CGI problem

Here this is the entire script
use DBI; use CGI; use HTML::Template; use strict; my ($usr,$pwd,$final,@par,$query_str,$Template,$q); $query_str = $ENV{QUERY_STRING}; if ($query_str='') { $query_str = $ARGV[0]; } @par = split (/['&','=']/,$query_str); $usr = $par[1]; $pwd = $par[3]; $Template = HTML::Template->new(filename => "user_login.html"); $Template->param(USER=>$usr); $Template->param(PASSWD=>$pwd); $final = $Template->output(); $q=CGI->new(); print $q->header(); print $q->start_html('user input'); print $q->h1($final); print $q->end_html();
Another important thing is that when i do not use any mudules I get what i expect that is when i dont use CGI,HTML Template and DBI and simply print the variables to the browser. I am using apache httpd server

Replies are listed 'Best First'.
Re^2: CGI problem
by Anonymous Monk on Nov 06, 2011 at 05:04 UTC
    if ($query_str='')
    Your destroying the query string right there. use == or 'eq'

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://936234]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2024-03-29 01:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found