Forum Moderators: coopster

Message Too Old, No Replies

session variables after meta refresh

the variables becomes unavailable

         

moriax

9:34 pm on Mar 29, 2006 (gmt 0)

10+ Year Member



Why seem my php session variables dissapear after a page refresh using meta tags.

*I start the session and set some variables. (tested and ok when printed)

*Then I refresh page with meta tag.

*Now the variables are no longer set. (Tested with isset(), and nothing prints)

What am I missing here?

scriptmasterdel

8:59 am on Mar 30, 2006 (gmt 0)

10+ Year Member



If your page is reloading to a different location then it will loose the varables, if you are using the get method (query string) then you can simply add

<META HTTP-EQUIV="refresh" CONTENT="5; filename.php?<? echo $_SERVER['QUERY_STRING'];?>">

to your meta tag and it will transfer all the variables to the next page.

If you are using the post method then you will need to either use hidden input boxes to contain the values as you transfer the variables to the next page.

Hope this has helped.

Del