General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old January 7th, 2004, 04:52 PM
dwamianm dwamianm is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Location: Texas
Posts: 14 dwamianm User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
check if seesion has expired

I would like to know how to check if a session has expired and as such redirect the user to a page informing them of this. Can anyone help me with this?

Reply With Quote
  #2  
Old January 7th, 2004, 05:45 PM
Mike_r Mike_r is offline
ExoCrew
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 68 Mike_r User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
You can use

if ( $_SESSION['name'] == NULL )
{
header ( "Location: http://newpage.com/newpage.html" );
}

Or maybe

if ( !session_is_registered('name') )
{
header ( "Location: http://newpage.com/newpage.html" );
}
__________________
ExoHelpDesk
ExoCrew Free Services

Reply With Quote
  #3  
Old January 7th, 2004, 05:47 PM
dwamianm dwamianm is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Location: Texas
Posts: 14 dwamianm User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
thanks

ill try that and see if it works out...thanks

Reply With Quote
  #4  
Old January 7th, 2004, 11:36 PM
nicat23's Avatar
nicat23 nicat23 is offline
Addicted to Chaos..
Dev Articles Novice (500 - 999 posts)
 
Join Date: Jan 2003
Location: Ft. Worth, TX
Posts: 653 nicat23 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 48 m 34 sec
Reputation Power: 0
Send a message via AIM to nicat23 Send a message via Yahoo to nicat23
Also you can use
Code:
if(!session_id()){
    header("Location:http://newpage.com/newpage.php");
}

checks to see if there is a valid session active let me know if that works.. HTH

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > check if seesion has expired


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