session variable problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
utahfriend
Forum Commoner
Posts: 34
Joined: Thu Nov 10, 2005 12:25 pm
Location: Bountiful, Utah

session variable problem

Post by utahfriend »

I have written a program that I want others to use from their own websites. I am trying to do this in frames, with the top frame my client's own website and the bottom frame my system located on a different domain. I want to do this so my client's domain address appears in the address bar at the top and thier clients do not see my domain name.

My problem is that I need to pass user information in session variables from page to page. but the session variable is lost during the session. I think it is being caused because there are two different domains on the page. I pass the variable from my client's domain to my domain via $_GET variables and in my domain set the session variables, but when I load a new page, the session variables are lost. Does anyone have a suggestion of how I can accomplish what I want to do?

You can see what I am trying to do by going to http://www.globalmarketingplus.com/login.php, username and password is "1".

Thanks for any help you can give me!

Ron
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

The host setting for the session is http://www... Any other subdomain will not see the session data.
utahfriend
Forum Commoner
Posts: 34
Joined: Thu Nov 10, 2005 12:25 pm
Location: Bountiful, Utah

Post by utahfriend »

Do you have any suggestions as to another way I can accomplish what I want to do?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

call session_set_cookie_params(), set the domain to your domain (without www, but leaving the dot)
Post Reply