Jump to content

Getting 'root' from session varialbes


melting_dog

Recommended Posts

Sorry guys, I just posted this before but must have hit send in its incompleted state. What I meant to say is:

 

Hi guys,

 

I am trying to retrieve some information from sessions. I have this in my header.php

 

<?php if(isset($_SESSION['username'])){

 

$username = $_SESSION['username'];

 

echo $username;

          } ?>

 

And it works fine - $username returns and prints the correct string.

 

But when I try the same echo on another file (that includes() header.php) I just get the word 'root'  - not the actual user name

 

Can anyone help me with this?

 

Thanks again!

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.