Jump to content

Variables passed through sessions


elmas156

Recommended Posts

Just a quick question...

 

When passing an "email" variable from page 1 to page 2 using a session I put the code:

 

$_SESSION['email'] = $email;

 

on page 1 to send the variable and

 

$email = $_SESSION['email'];

 

on page 2 to make it into a variable again...

 

The question is if I want to pass the same variable from page 2 to page 3 do I have to put

 

$_SESSION['email'] = $email;

 

on page 2 as well or can I just put

 

$_SESSION['email'] = $email;

 

on page 3 if the session has not ended yet?

Link to comment
https://forums.phpfreaks.com/topic/121633-variables-passed-through-sessions/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.