html - Problem with calling SESSION in another php tag
one text
Solution:
If for some reason $_SESSION['editPassword'] doesn't have a default value, that might trigger an undefined index until this runs, which i suppose doesn't run until a form is submitted. So what you could do is
if (isset($_SESSION['editPassword'])){
echo $_SESSION['editPassword'];
}
You might also what to put a condition over when the form is submitted, something like
if (isset($_POST['submit])){
echo $_SESSION['editPassword'];
}
or read on $_REQUEST
Source