Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re^2: elsif loop

by Anonymous Monk
on Dec 12, 2006 at 15:55 UTC ( #589302=note: print w/replies, xml ) Need Help??

in reply to Re: elsif loop
in thread elsif loop

Thanks for all the comments. I have considered each of them. I don't think i have access to the server logs for the server i am working on, so i can't check the exact perl error when i get an internal server error. Where should these logs be? When i applied jberts first example example all cases work fine except when an incorrect username and password are entered. In that case i get an internal server error.
if($username eq $row[0] && $hashPassword eq $row[1]) { # Go to the new page } else { error(); }
Using the second example i am given access to the next page with the correct user name and an incorrect password. Does anyone know why this is happening?

Replies are listed 'Best First'.
Re^3: elsif loop
by nimdokk (Vicar) on Dec 12, 2006 at 17:26 UTC
    Just a suggestion for troubleshooting. Especially since you may not have access to server logs. Try taking the logic you are using and putting it into a script you can run from the commandline to make sure the logic works the way you expect before putting it into the CGI script. Once you get that working (and know it works their), then put it back in and test it with the CGI app. I've often found simplifying a script will help get to the root of the problem and a fix is fairly apparent at that point. Adding use strict and use warnings in the test script will also help. Hope that helps.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (10)
As of 2021-04-13 18:48 GMT
Find Nodes?
    Voting Booth?

    No recent polls found