I tried to do this to fix the changing password problem .
I changed this line
$oldPass = hash("sha256", mysql_real_escape_string($_POST["currentPassword"]));
to
$oldPass = hash("sha256", $oldPass.$salt, mysql_real_escape_string($_POST["currentPassword"]));
But it didn't work.
The update process starts with
if($oldPass == $hashedPass){
I tried to define $hashedPass and fetch the password from the DB to it .
Still didn't work .
And says
"You must type in the correct current password before you can set a new password. "
Please help