in reply to Re: Accessing information pulled from mysql
in thread Accessing information pulled from mysql

Thanks for the suggestions, grep, when i type a valid username, and leave the password blank, it is giving me the correct message "Enter your password" so it is looking at the next condition, i did make the change to the prepare statement though, but actually im pretty sure my problem is in how im assigning the return values to the hash %info because when i type in a valid username and an invalid password, it still gives me the 'invalid username' error even though its a good username, if i type in the correct username and correct password, i get the loan amount printed on the page, which is also what its suppose to do. Any other ideas?

Thanks for the help
  • Comment on Accessing information pulled from mysql

Replies are listed 'Best First'.
Re: Accessing information pulled from mysql
by grep (Monsignor) on Aug 17, 2002 at 23:05 UTC

    One other hint is: always specify your field names in your SELECT statments. It helps tracking down problems like this down (eg. you know for certain that the column name is spelled correctly in your code, or your statement would fail) also it prevents MySQL from pulling extra information you do not need

    Also please mark the line your error is coming from - I miscounted lines (my browser doesn't make it easy - where an editor does) and was looking at the wrong code :(. It just helps us help you :).



    grep
    Mynd you, mønk bites Kan be pretti nasti...
      I finally got it, because i was pulling from mysql where pword=$password, if the password was wrong then $user was blank, therefore causing an invalid username error even if the username was correct...i could shoot myself :)

      Thanks for the input grep, normally i would have a more general error message but in this case since i was trying to specify where i was getting an error (and since this is just for my wife anyway) i needed to keep the username and password errors separated so i could know where to look, i did change my select statement to pull to specify my field names, thanks again