Current location: Hot Scripts Forums » General Community » Script Requests » Showing login page if not logged in


Showing login page if not logged in

Reply
  #1 (permalink)  
Old 12-23-07, 01:41 PM
eprots eprots is offline
Newbie Coder
 
Join Date: Dec 2007
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Question Showing login page if not logged in

I've got a login system set up on my site, and at the moment, if the user isn't logged in, it displays a blank page (with a redirect in the <HEAD> to send users to the login page)

Is it possible to have something that checks if the user is logged in or not, if now, send to login page, if so, show the page.

E.g.

Guest example
1) User tries to access protected page
2) User gets sent to the login page immediately

Member example
1) User tries to access protected page
2) Cookies have (already) been set (because user is logged in), user can view page

I would just rather not have the redirect

Any help/suggestions appreciated.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 12-23-07, 05:58 PM
curbview.com's Avatar
curbview.com curbview.com is offline
Junior Code Guru
 
Join Date: May 2006
Posts: 555
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by eprots View Post
I've got a login system set up on my site, and at the moment, if the user isn't logged in, it displays a blank page (with a redirect in the <HEAD> to send users to the login page)
Well, it would help if you defined if you are using php or Perl. Hopefully, you will be able to mod whatever script you are using to perform these checks as simple javascript based methods are not worth your time and effort.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
SIMPLE... php register..login & personal page dedicated to person logged in! one2mel Script Requests 5 12-20-07 03:48 AM
Tricky Login Page losse PHP 32 07-07-06 11:24 AM
Classified Ads skipper23 Perl 3 11-22-05 03:22 AM
Classified Ads skipper23 Perl 2 12-30-03 04:43 AM


All times are GMT -5. The time now is 01:27 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.