|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
sessions and headers
I want to know if the value set in session will transfer to the another page when I will use the header function to redirect the page?.................
I have done it, doesn't work..... I dont know if it on my server or it is really a wrong procedure |
|
#2
|
|||
|
|||
|
RE: sessions and headers
yes it will work, so long as you're calling session_start() before the redirect
|
|
#3
|
|||
|
|||
|
RE: sessions and headers
can someone give me a complete example please....
|
|
#4
|
|||
|
|||
|
RE: sessions and headers
http://us2.php.net/session_start
Their example is pretty good |
|
#5
|
|||
|
|||
|
RE: sessions and headers
I have tried everything but it seems not working at all,,,, Do I need to have configuration on my configuration,,,, thanks for having a time
|
|
#6
|
|||
|
|||
|
RE: sessions and headers
guys this is my code..
if (mysql_num_rows($stuff) > 0) { $row=mysql_num_rows($stuff); session_start(); header("Cache-control: private"); $_SESSION["access"] = "granted"; header("Location: ./success.php"); } else { header("Location:./error.php"); } // the first page session_start(); header("Cache-control: private"); if ($_SESSION["access"] == "granted") header("Location: ./success.php"); else header("Location: ./error.php"); // the 2nd page firefox detected this problem -This problem can sometimes be caused by disabling or refusing to accept cookies. |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Programming Theory > sessions and headers |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|