Well, I have successfully merged a register page to register an account in MSSQL and then the same account into MySQL, but MySQL has a special encryption, and I am having problems Hashing the damn password...
Here is the code, I have tried too many different ways to hash a string, but failed...
I hope someone can help fast, because its pretty urgent.
Thanks in advance!
Here is the code, I have tried too many different ways to hash a string, but failed...
PHP:
$pass = stripslashes($_POST['pass']);
function makePassword( $pass ) {
$chars = "abcdefghijklmnopqrstuvwxyz" ;
$chars .= "ABCDEFGHIJKLMNOPQRSTUVWXYZ" ;
$chars .= "0123456789";
$len = strlen($chars);
$salt = '';
mt_srand(10000000 * (double) microtime());
for ($i = 0; $i < 32; $i ++) {
$salt .= $chars[mt_rand(0, $len -1)];
}
return md5( $password . $salt ) . ':' . $salt ;
}
echo makePassword( $pass ) ;
I hope someone can help fast, because its pretty urgent.
Thanks in advance!

