NYCPHP Meetup

NYPHP.org

[nycphp-talk] problem SOLVED: session variables disappear after redirection

Michael Southwell michael.southwell at nyphp.com
Thu Jun 14 22:16:47 EDT 2007


At 09:56 PM 6/14/2007, you wrote:
header( "Location: 
http://example.com/membership.php?action=pay_internet&join=$joinFlag&PHPSESSID={$_SESSION['id']}" 
);

>This should suffice
>
>header( "Location: 
>http://example.com/membership.php?action=pay_internet&join=$joinFlag&".SID );

I knew that, but I wanted to be able to see it myself. SID is empty 
if cookies are working, so the header doesn't really need it for 
those people; and SID is set when cookies are disabled, so the header 
will have it for them.  But I felt a little more comfortable actually 
seeing it, especially during testing. I could also have used 
session_id() but you had gotten me started down the SID trail, so I 
stayed there ;-).

>_______________________________________________
>New York PHP Community Talk Mailing List
>http://lists.nyphp.org/mailman/listinfo/talk
>
>NYPHPCon 2006 Presentations Online
>http://www.nyphpcon.com
>
>Show Your Participation in New York PHP
>http://www.nyphp.org/show_participation.php

Michael Southwell, Vice President for Education
New York PHP
http://www.nyphp.com/training - In-depth PHP Training Courses





More information about the talk mailing list