Jump to content

Meta Refresh And Variables.


somedude
 Share

Recommended Posts

Hi everyone, thanks for taking the time to read this.Anyway, I have been working on a side project for the past year. At two different points in the program a meta refresh reopens the current windowand re-sizes the window. It all works with no problem on hostmonster, but I triedto give the program to a friend of mine that has their site hosted at 1and1.comand right at the moment of the meta refresh it seems like all Session's are lost.Since it works perfect on Hostmonster, I think maybe it is a setting on 1and1.com?But what setting? I was searching around google and I found a post saying that sessions are always lost during meta refresh.But then why is there no problem at hostmonster?If anyone has any idea please post it. This is driving me crazy

Link to comment
Share on other sites

Whoever said sessions are always lost during meta refresh doesn't know what they're talking about. Meta refreshes are actually the way to refresh while explicitly keeping the session. A header refresh will lose the session before a meta refresh will. This site, and many others, use a meta refresh "thank you" page after logging in. Are you refreshing to a different domain or subdomain? Sessions won't carry across domains.

Link to comment
Share on other sites

Whoever said sessions are always lost during meta refresh doesn't know what they're talking about. Meta refreshes are actually the way to refresh while explicitly keeping the session. A header refresh will lose the session before a meta refresh will. This site, and many others, use a meta refresh "thank you" page after logging in. Are you refreshing to a different domain or subdomain? Sessions won't carry across domains.
I was thinking the same thing.. I actually got the idea from the meta refresh on this site very site a while ago.The refresh re opens the same file, and if the session is set one thing happens, if not it asks you for a nameand to press connect.on 1and1.com, after the refresh it still loads the view that shows up when the session isn't set.
Link to comment
Share on other sites

When you log in and a session gets created, examine the session cookie in your browser and see what the parameters are.
ok, I will post the results after I can do that later today. I don't have access to the server at the moment.thank you very much for the fast reply.
Link to comment
Share on other sites

I got a chance to mess around with the code today and I got it working.It turned out to be nothing to do with sessions at all.. uniqid() was not working..$a = uniqid();echo $a;outputs nothing.anyway.. I just made my unique key a different way and it works fine..But I am just wondering if that is because of a server setting? If so, which one?

Link to comment
Share on other sites

Guest FirefoxRocks

uniqid() is not a predefined function so unless you have defined the function somewhere it will output a warning.EDIT:Never mind, please ignore this

Edited by FirefoxRocks
Link to comment
Share on other sites

uniqid() is not a predefined function so unless you have defined the function somewhere it will output a warning.
it works fine on my server though, I never had to define it before.. Anyway, I'm not doubting you.. just saying it's weird how it works on my server.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...