[Athens-pm] <a href="my_script.pl?argument1=string>Click this</a> can't fix it!
Antonis Faragitakis
skatoulininis at yahoo.com
Fri Feb 28 03:51:44 CST 2003
--- Philip Lees <pjlees at ics.forth.gr> wrote:
> Antonis Faragitakis wrote:
>
> > > if ( $user_pass eq $users{$user_name} ) {
> >
> > I used the code you writen in my CGI, the problem
> was,
> > that when you submited the login form without
> username
> > and password you still have access to the system.
> > That's why i check if $user_name and $user_pass
>
> Why not check for those right at the start.
> Something like:
>
> print_error_page and exit unless $cgi->param(
> 'user_name' ) and
> $cgi->param( 'user_pass' );
Yes i know "There is more than one to do it!"
but why mess with another sub routine, when i can
add two more $variable in the code and not two new
lines of code!?
Antonis
> Write a sub print_error_page that does just that.
>
> Philip
> --
More information about the Athens-pm
mailing list