Programming Theory
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesProgramming Theory

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old April 21st, 2006, 08:42 AM
goobuzzamo goobuzzamo is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Manila, Philippines
Posts: 27 goobuzzamo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via Yahoo to goobuzzamo
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

Reply With Quote
  #2  
Old April 21st, 2006, 08:57 AM
notepad notepad is offline
Codewalkers Loyal (3000 - 3499 posts)
 
Join Date: Apr 2007
Location: Central, IL USA
Posts: 3,214 notepad User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Send a message via AIM to notepad
RE: sessions and headers

yes it will work, so long as you're calling session_start() before the redirect

Reply With Quote
  #3  
Old April 21st, 2006, 08:59 AM
goobuzzamo goobuzzamo is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Manila, Philippines
Posts: 27 goobuzzamo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via Yahoo to goobuzzamo
RE: sessions and headers

can someone give me a complete example please....

Reply With Quote
  #4  
Old April 22nd, 2006, 07:15 AM
pickleman78 pickleman78 is offline
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Location: Dallas,TX,USA
Posts: 582 pickleman78 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via AIM to pickleman78
RE: sessions and headers

http://us2.php.net/session_start

Their example is pretty good

Reply With Quote
  #5  
Old April 24th, 2006, 01:31 AM
goobuzzamo goobuzzamo is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Manila, Philippines
Posts: 27 goobuzzamo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via Yahoo to goobuzzamo
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

Reply With Quote
  #6  
Old April 24th, 2006, 05:32 AM
goobuzzamo goobuzzamo is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Manila, Philippines
Posts: 27 goobuzzamo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via Yahoo to goobuzzamo
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.

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesProgramming Theory > sessions and headers


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT