How can individual encryption for username and password be achieved using md5() in PHP?

To achieve individual encryption for username and password using md5() in PHP, you can concatenate the username or password with a unique salt before hashing them with md5(). This ensures that each username and password combination has a unique hash value, adding an extra layer of security to the encryption process.

$username = "example_username";
$password = "example_password";
$salt = "unique_salt";

$usernameHash = md5($username . $salt);
$passwordHash = md5($password . $salt);

echo "Encrypted Username: " . $usernameHash . "<br>";
echo "Encrypted Password: " . $passwordHash;