in reply to Basic var verification problem - I'm ashame to have to ask this...

My guess: if the login is incorrect, then no rows are returned. That means your attempt to call fetchrow_array returns undef, and thus the while loop is never executed at all.

Another note: maybe this is a simplified version of your code, but you should probably check $login to make sure it doesn't contain any characters you don't want. Since it's used directly in the SQL query, a user could possibly use it to inject their own SQL query to be executed.

DBI provides methods to help with that, with things such as the quote() method.

- Matt Riffle

  • Comment on Re: Basic var verification problem - I'm ashame to have to ask this...

Replies are listed 'Best First'.
Re: Re: Basic var verification problem - I'm ashame to have to ask this...
by DaWolf (Curate) on Mar 25, 2002 at 03:45 UTC
    Excellent point.

    Thanks.

    Er Galvão Abbott
    a.k.a. Lobo, DaWolf
    Webdeveloper