I’m looking at this code and thinking I can’t see the error because there is somethign wrong but I just can’t see it… I’m hoping someone here can see it as staring at it for the last half an hour hasn’t made it clear to me.
The code:
if (!empty($_SESSION['email_notifications'])) {
print '<br>SESSION[email_notifications] = ['.$_SESSION['email_notifications'].']';
print '<br>Session exists!!!';
$from = $_SESSION['display_name'].' <'.$_SESSION['email_notifications'].'>';
print '<br>$from = ['.$from.']';
}
Outputs this:
SESSION[email_notifications] = [myemailaddress@email.com]
Session exists!!!
$from = [ ]
The session value is set but when it is stored in a variable it disappears???
Hmmmm. Php5?
This is crazy silly, but have you checked the output SOURCE, rather than html? You’ve put angle brackets around it, it may just not be rendering on the screen.