Hi,
I have a file called profile_parser.php
Within that file I have one function which I call called change_password.
In that function, if the password change is successful I set a variable called $pass_change to true.
Now back up at the main part of the file. I have the following code:
if($pass_change == true){
echo 'Password changed successfully. Please login again';
}
elseif($pass_change !=true){
echo '</ul><br />To view your updated profile, <a href="profile.php?user_id='. $_SESSION['user_id'] . '">click here</a><br><br>
<a href="edit_profile.php">Click here</a> to edit your profile again.';
}
I'm not sure if the $pass_change variable is being sent back from the function. $pass_change seems to be always set to false.
How can I solve this?