Theseekers
Technical User
Hello everyone.
I have played around with redirecting feature with PHP 4.3.7 and found out that because I am running php with IIS 5; I can not use the header function for automatically redirecting my pages while maintaining the session cookies.
A tip has been provided in this forum (thank you very much) suggested that I use the Meta tags instead. I did and it works.....partially. Let me provide you a pseudo code and hope that some 1 will spot my mistake since I am fairly new to PHP.
I have 3 scripts (login, welcome, logout). My login script gets the user input through a form, test it to make sure that their credentials is all match up. If so, I redirect them to my welcome page via a meta tag as:
print '<Meta http-equiv="refresh" content="2; url=http://locahost/mywebserver/phpscripts/welcome.php">';
This is ok because I can see/print all the information using the session that was created in the login. However, when I issue the similar command (only change the welcome.php to logout.php) in the welcome scripts then what it does is to create an empty new session id and use it to fill in the blank on my logout page.
I don't quite understand what is happenning here??? Does the refresh imply that once you have refreshed, the browser will consider that there is not any current session cookies are available and create a new one ????
TIA for your time and help.....
I have played around with redirecting feature with PHP 4.3.7 and found out that because I am running php with IIS 5; I can not use the header function for automatically redirecting my pages while maintaining the session cookies.
A tip has been provided in this forum (thank you very much) suggested that I use the Meta tags instead. I did and it works.....partially. Let me provide you a pseudo code and hope that some 1 will spot my mistake since I am fairly new to PHP.
I have 3 scripts (login, welcome, logout). My login script gets the user input through a form, test it to make sure that their credentials is all match up. If so, I redirect them to my welcome page via a meta tag as:
print '<Meta http-equiv="refresh" content="2; url=http://locahost/mywebserver/phpscripts/welcome.php">';
This is ok because I can see/print all the information using the session that was created in the login. However, when I issue the similar command (only change the welcome.php to logout.php) in the welcome scripts then what it does is to create an empty new session id and use it to fill in the blank on my logout page.
I don't quite understand what is happenning here??? Does the refresh imply that once you have refreshed, the browser will consider that there is not any current session cookies are available and create a new one ????
TIA for your time and help.....