Jump to content

php session help!


lilywong

Recommended Posts

i did this, but no print out comes out.

//register session
$user = $this_user;
echo $user;

the echo print out Object id #2

when i do this
//register session
$user = $this_user;
echo $user->domainName;

the echo can print out the domainName, for eg, homeHosting
Link to comment
Share on other sites

[quote author=legohead6 link=topic=102045.msg404886#msg404886 date=1154052078]
Pg 1

[code]SESSION_START();
$_SESSION['user']="$variable";
[/code]

the $variable i have is not a defined variable, it is an object, and point to a class file to get the data. in pg1, if i echo echo $user->UserName, it just work fine. when i click to pg2, and echo the same thing, nothing comes out!

if i simply define $_SESSION['user']="test";, and i echo $_SESSION['user'] in pg2, it just works fine.
Link to comment
Share on other sites

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.