md5 hash can be easily cracked by using Rainbow Tables. So, pure md5 hash must be using only for checking data integrity and not for security purposes.
However, by using "salt" it's become impossible to reverse md5 and get the original data, which means that this method can be used to encipher passwords and other important information.
Salt is just a some random bits, for instance some text or even image.
So, instead of
we should use something like this
<?php
$salt = 'some text';
$pwd = 'my_pwd';
$hash = md5($pwd . $salt); ?>
or like this
<?php
$salt = 'some text';
$pwd = 'my_pwd';
$hash = md5(md5($pwd) . $salt); ?>
or even like this
<?php
$salt = 'some text';
$pwd = 'my_pwd';
$hash = md5(md5($pwd . $salt) . $salt); ?>