Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-07-15 14:27:30

jeffBrady
Member
From: Wisconsin-US
Registered: 2009-06-08
Posts: 11

$_SESSION['variables'] go "POOF" after context changes

$_SESSION[‘variables’] go “POOF” after context changes from default page. They are available when the default page loads, but then they dissappear when the context changes to a section or an individual article (which kicks the user back to the login page).

Here is the code in question:

<txp:php> session_start(); if(empty($_SESSION[‘fname’])){ header(“http://www.myloginpage.php”); }
</txp:php>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”>
<html xmlns=“http://www.w3.org/1999/xhtml”>
<head>…


Rocky!?

Offline

#2 2009-07-16 01:08:55

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: $_SESSION['variables'] go "POOF" after context changes

Are you carrying the session across to the other section pages, and not just the default?

Offline

#3 2009-07-16 16:05:27

jeffBrady
Member
From: Wisconsin-US
Registered: 2009-06-08
Posts: 11

Re: $_SESSION['variables'] go "POOF" after context changes

Just the deafult page; which initially contains an article list. When the context changes to an individual article, the session variable (and presumably the session) is lost.


Rocky!?

Offline

Board footer

Powered by FluxBB