I'm new at PHP. I've done a search for this problem on this forum but can't find the exact solution.
I have a file "fred.php" which contains a form, when submitted calls itself - "fred.php". Various fields are (or will be!) created/removed/updated in the form as the user fills in fields and presses the "submit" button.
But I cannot get the page to remember a value entered in an input field after the user presses submit.
I have tried using $_SESSION, but without success. Maybe this is supposed to be used to recall variables in a different session (so I'm not sure why it doesn't work anyway), but my problem is in the same session, just a [recursive] refresh of the page. So maybe I need to use something else.
Code: Select all
if (!isset($_SESSION['joe'])) {
$_SESSION['joe']=1;
}else{
$joe++;
}
Any guidance would be greatly appreciated.
cheers
Steve