Hi i am new to PHP,
Can anyone fix this problem to me. i am writing a code to change password where i have already encoded a password and stored in database. and in a new changepassword form i have to do two things one is to get the oldpassword , encode it and compare it with already stored password and the second one is to get NEWPASSWORD , encode it and store it in DB. ie i need to encode two times . one is for old password and another is for new password. i succesfully encode old password and checks it to DB. But i am unable to encode a NEWPASSWORD.
function encode5t($OldPassword)
{
for($i=0; $i<5;$i++)
{
$OldPassword=strrev(base64_encode($OldPassword));
}
return $OldPassword;
}
$EncOldPwd = encode5t($OldPassword);
function encode5t($NewPassword)
{
for($i=0; $i<5;$i++)
{
$NewPassword=strrev(base64_encode($NewPassword));
}
return $NewPassword;
}
$EncNEWPwd = encode5t($OldPassword);
WHEN I RUN THIS i got the error as
Fatal error: Cannot redeclare encode5t() (previously declared in C:\wamp\www\prawin\new\locations\test\admin\Changepassword.php:9) in C:\wamp\www\prawin\new\locations\test\admin\Changepassword.php on line 25