Cool, thanks so much for the help Packland.
That has got me up and running again. Honestly this session business was beginning to do my head in! The trick was as you said to use 2 variables.
One extra bit was the stickyness so $fredx is only updated it there is a value in $maryx.
Anyway one more question - any idea how would I make it remember the value after I restart the browser?
Thanks again 🙂
Cheers
Al
(I have included the code I have used just for future ref)
<?
session_start();
if (!$SESSION[fredx]) {
session_register("fredx");
}
echo "Current saved=" . $fredx . "<br>";
if ($maryx) $fredx=$maryx;
echo" <form action=$PHP_SELF method=post>";
echo" <input type='text' name='maryx' value='" . $fredx ."'>";
echo" <input type='submit'>";
echo"</form>";
echo "<br>To save=" . $fredx;
echo "<br>New=" . $maryx;
?>