Re: [PHP] Weird sessions problem

2004-11-29 Thread steve
Andre Dubuc wrote: > I gather that all of the script occurs on one page, and that the page is > 'refreshed' by some action of the user (i.e. that the user has > clicked/entered login info on some other page, and that this page then > needs to detect that change.) No, it's when moving from one pag

Re: [PHP] Weird sessions problem

2004-11-28 Thread Jason Wong
On Monday 29 November 2004 06:46, steve wrote: > No to both. When I arrive at the new page, the sessions vars (as expected) > contain the values set by the previous page. $ref_page is not set. The > values are transferred to $ref_page by the function. That works as planned. > I then reset the valu

Re: [PHP] Weird sessions problem

2004-11-28 Thread Andre Dubuc
On Sunday 28 November 2004 05:46 pm, steve wrote: > Jason Wong wrote: > > On Sunday 28 November 2004 22:46, steve wrote: > >> I tried printing out the values before and after each of those lines. > >> After line 53, $ref_page is an array containing precisely the values I > >> expect, so the functio

Re: [PHP] Weird sessions problem

2004-11-28 Thread steve
Jason Wong wrote: > On Sunday 28 November 2004 22:46, steve wrote: > >> I tried printing out the values before and after each of those lines. >> After line 53, $ref_page is an array containing precisely the values I >> expect, so the function is working. After line 54, the session var has >> been

Re: [PHP] Weird sessions problem

2004-11-28 Thread Jason Wong
On Sunday 28 November 2004 22:46, steve wrote: > I tried printing out the values before and after each of those lines. After > line 53, $ref_page is an array containing precisely the values I expect, so > the function is working. After line 54, the session var has been reset, as > expected, to mat

Re: [PHP] Weird sessions problem

2004-11-28 Thread steve
Greg Donald wrote: >> define('THIS_PAGE',$_SERVER['PHP_SELF']); > > Why would you need to do this? I'd just use $_SERVER['PHP_SELF'] as is. I make frequent use of this value, so putting it in a constant saves typing and makes the page a little clearer. >> function get_ref_page() { >> /* Ret

Re: [PHP] Weird sessions problem

2004-11-28 Thread Greg Donald
On Sun, 28 Nov 2004 13:14:54 +0100, steve <[EMAIL PROTECTED]> wrote: > I have a routine that uses sessions vars to hold the details of the previous > page, so I can bounce back to it if necessary. But I'm having some weird > problems with it. In the page I have the following (line numbers included