//encrypt user password // hash produces a fixed length string $hashFormat = "$2y$10$"; // Random characters $salt = "HZTym3F5Ade6tvnVf5rXve"; // combine the hash and salt $hashFormat_salt = $hashFormat . $salt; // password encrypted $password = crypt($password,$hashFormat_salt);