Forum Moderators: coopster
I have a mail form in my nav which posts to the current page (mail form works fine). In the head of each page, I have an include which points to the following piece of code:
<?php session_start();
if (isset($_REQUEST['email']))
$_SESSION['requested'] = "yes";
?>
This should check to see if the mail form has been filled out and set 'requested' in the session to 'yes'. In my understanding, when you navigate to other pages, 'requested' should remain as 'yes'.
To test the variable has been assigned, further down the page, I am trying to echo the 'requested' variable using:
<?php echo $_SESSION['requested'] ?>
This works fine on the initial page after the mail form. However, when I navigate to another page, it seems to forget all about "$_SESSION['requested']" and trying to echo this produces nothing.
Thankyou in advance for taking the time to look and if you would like more information please don't hesitate to ask.
Cheers
Fraser