Jump to content

Recommended Posts

This kind of follows on from another question, but am working backwards, and trying to simply echo some contents from a session.

 

So at the top of my page I have :

 

<?php
session_start();
?>

 

And, using dreamweaver, have my session variable all looking present and correct in the applications > bindings panel.

 

So I presumed all I need to do to echo any of these variables is :

 

<?php echo $_SESSION['username']; ?>

 

..except nothing is displaying.....?

Link to comment
https://forums.phpfreaks.com/topic/40026-solved-echoing-session-variables/
Share on other sites

Thanks for the suggestions.

 

What I did in the end was look at the profile page - it uses a recordset, and then displays the email from the matching logged in user.

 

So i used the same recordset, and it's doing what i want now - although I'm still not sure exactly why the session variables are available in that way, but won't simply display using echo. (it didn't like the curlies.)

 

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.