Hi,
I have a form with a textbox called 'email' and then a submit button. I want to register $email, and them open another page. So I have..
if ($submit){
session_register('email');
Header("Location: http://www.mydomain.com/page2.php");
}
Then on page2.php I have echo $email.
For some reason the session isn't displayed. However, if I remove
Header("Location: http://www.mydomain.com/page2.php");
from the if statement, press submit, then manually open page2.php, the session is displayed. Can anyone tell me why? It seems that having the header("location.... in the if statement either stops the session registering, or wipes it after its registered.
Can anyone help?
Thanks
Ben