Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > PHP How-To
|
PHP How-To Post your "How do I do this with PHP?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 3rd, 2007, 09:00 AM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to crmpicco Send a message via AIM to crmpicco Send a message via MSN to crmpicco Send a message via Yahoo to crmpicco
Default $_SESSION value gets cleared moving page to page

I am setting a PHP session with the following code:

PHP Code:
[s][s][s][s][s][s][s][s]session_start();[/s][/s][/s][/s][/s][/s][/s][/s]
[
s][s][s][s][s][s][s][s]$_SESSION["lang"] = "de";[/s][/s][/s][/s][/s][/s][/s][/s
This is set on a page called "index.php", on "index.php" there is a link to "contact.php". On "contact.php" I am checking for the session value, but it appears to be blank?

Simply using:
PHP Code:
echo "<strong>HEADER SESSION -> " $_SESSION["lang"] . "</strong>"
Is there something that is clearing it? I'm not using anything to clear the session value, just don't understand how it is behaving here?

Picco



www.crmpicco.co.uk
www.ie7.com
__________________
_______________________
Ayrshire Minis - a Mini E-Community
http://www.ayrshireminis.com
http://www.crmpicco.co.uk
 
Old November 3rd, 2007, 10:04 AM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to crmpicco Send a message via AIM to crmpicco Send a message via MSN to crmpicco Send a message via Yahoo to crmpicco
Default

turns out
Code:
session_start();
was required on every page!!!

Picco

www.crmpicco.co.uk
www.ie7.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
Master Page Method: Code-Behind for Content Page kwilliams ASP.NET 2.0 Professional 3 June 2nd, 2008 12:57 PM
access C#.Net page as action of calssic ASP page mansharma_s ASP.NET 1.x and 2.0 Application Design 6 January 7th, 2008 10:58 AM
moving around a page ozPATT Excel VBA 1 October 17th, 2005 02:42 AM
moving variable from one page to other Asteroid ASP.NET 1.0 and 1.1 Basics 1 November 30th, 2004 12:16 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.