- Joined
- Aug 25, 2008
- Messages
- 79
- Reaction score
- 1
Okay so like you guys so my thread about my Parse errors, those were dumb errors. But i would like to clarify something. When i use sha1($pass) where variable $pass = $_POST['pass'] which gets from the form with the following data <input type="password" width="100" maxlength="20" name="pass" />.
Now when i execute the following query on php:
Yes, i do enter the correct user name and password but $usernum returns the value of Zero. So i trouble shooted this by adding echo "$passsha1" and then compared to the one on MySQL. Indeed the encryptions were incorrect. That is my 1st thing.
Seconds is what the fk is "salt".
~becoool
Ty soo mch
Now when i execute the following query on php:
Code:
$userq = mysql_query("SELECT * FROM `accounts` WHERE `name` = '".$user."' AND `password` = '".$passsha1."'") or die(mysql_error());
$usernum = mysql_num_rows($userq);
Yes, i do enter the correct user name and password but $usernum returns the value of Zero. So i trouble shooted this by adding echo "$passsha1" and then compared to the one on MySQL. Indeed the encryptions were incorrect. That is my 1st thing.
Seconds is what the fk is "salt".
~becoool
Ty soo mch

