If i run the following i should be getting the same hash but for some reason they come out different. $salt="553099"; $pass = "computer"; $password = "computer"; $pass = sha1('$salt . $pass'); $pass2 = sha1('$salt . $password'); print $pass; print "<br/>"; print $pass2; PHP: It prints 15a53d55ae2af4db3843aa8700729c2332626859 fd78226853ad10dcac53b55748983d1ccf31ffc1 HTML: Any explanation is appreciated
because you're doing it wrong, what happen is instead of 553099computer that should be pass to the sha1 function your actually passing '$salt . $pass' and '$salt . $password' just remove the single quotes..