lisaw has asked for the wisdom of the Perl Monks concerning the following question:
I want to give an error message if the user tries to access the program directly "give_access.cgi", without using a standard form that would provide the userid, useremail, and username. I've tried the following but keep getting a error-500:use CGI; my $q = new CGI; $user_id=$q->param('userid'); $user_email=$q->param('useremail'); $user_name=$q->param('username'); $give_access = "<a href=give_access.cgi?setsig;user=$user_id;email=$us +er_email;passwd=$user_password;multiname=$multiname>";
Any suggestions? Thanks! Lis.if ($q->param('userid')) { } else { &error_message("You need to use the form to access this progr +am!"); } sub error_message { local($e) = @_; print <<"END"; <html> <head> <title>Error</title> <center> Error. The error seems to be:<p> $e END exit; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Value Check
by blaze (Friar) on May 30, 2003 at 23:32 UTC | |
by lisaw (Beadle) on May 30, 2003 at 23:56 UTC | |
|
Re: Value Check
by tcf22 (Priest) on May 30, 2003 at 23:49 UTC |