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 January 20th, 2004, 07:06 PM
Andrew's Avatar
Andrew Andrew is offline
Moderator
Click here for more information
 
Join Date: Apr 2007
Location: United Kingdom
Posts: 1,947 Andrew User rank is Private First Class (20 - 50 Reputation Level)Andrew User rank is Private First Class (20 - 50 Reputation Level)  Folding Points: 2429 Folding Title: Novice Folder
Time spent in forums: 4 Days 6 h 10 m 55 sec
Reputation Power: 4
Logins

Hi I make alot of login scripts for scripts i make and usually the user is sent to a the loggedin page and the loggedin page checks the database for the session and user status to check if the user is authenticated. I have heard that forwarding the user to a different page isnt the best way can anyone suggest a better way?

Reply With Quote
  #2  
Old January 20th, 2004, 07:08 PM
Andrew's Avatar
Andrew Andrew is offline
Moderator
Click here for more information
 
Join Date: Apr 2007
Location: United Kingdom
Posts: 1,947 Andrew User rank is Private First Class (20 - 50 Reputation Level)Andrew User rank is Private First Class (20 - 50 Reputation Level)  Folding Points: 2429 Folding Title: Novice Folder
Time spent in forums: 4 Days 6 h 10 m 55 sec
Reputation Power: 4
RE: Logins

Here is an example of what i normally use.

// Database connection and query above this.

If($num !=0){
header("location:loggedin.php");
setcookie($username, $pw);
}else{
Exit;
}

Thats only a snippet but thats what i normally do.

Reply With Quote
  #3  
Old January 20th, 2004, 07:19 PM
Matt Matt is offline
Contributing User
Codewalkers Specialist (4000 - 4499 posts)
 
Join Date: Apr 2007
Location: Florida
Posts: 4,158 Matt User rank is Private First Class (20 - 50 Reputation Level)Matt User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 h 12 m 16 sec
Reputation Power: 7
RE: Logins

[moved to theory]

Reply With Quote
  #4  
Old January 21st, 2004, 07:40 AM
nawlej nawlej is offline
Contributing User
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: Dallas, Tx. USA
Posts: 2,008 nawlej User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 h 7 m 51 sec
Reputation Power: 5
RE: Logins

A lot of sites do it that way (login "splash page"). Any kind of online application generally does it, like hotmail, any online mail service really. I dont think there is really a cut and dry way to do it. My preffered way is to build an authentication script to check and see if the user has logged on, then build the page from there. If they arent logged on, build the login box, if they are, build the box with "logged in" options. Either way, your dealing with sessions. If you dont mind letting the users see some things on the site without being authenticated, this is fine. If you have a site totally closed off, in which everything is written to be viewed by "members only" then the splash page is the preffered way to go I think.

Reply With Quote
  #5  
Old January 21st, 2004, 10:26 PM
Andrew's Avatar
Andrew Andrew is offline
Moderator
Click here for more information
 
Join Date: Apr 2007
Location: United Kingdom
Posts: 1,947 Andrew User rank is Private First Class (20 - 50 Reputation Level)Andrew User rank is Private First Class (20 - 50 Reputation Level)  Folding Points: 2429 Folding Title: Novice Folder
Time spent in forums: 4 Days 6 h 10 m 55 sec
Reputation Power: 4
RE: Logins

ok im using a template system to format the pages would an include function be advisable eg if logged in included loggedin.php which has a little authentication script at the top. If not logged in include login.php and stop current script? Or is it up to scripters preferance.

Reply With Quote
  #6  
Old January 22nd, 2004, 10:36 PM
nawlej nawlej is offline
Contributing User
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: Dallas, Tx. USA
Posts: 2,008 nawlej User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 h 7 m 51 sec
Reputation Power: 5
RE: Logins

invoking an include is my preffered method.

Reply With Quote
  #7  
Old January 23rd, 2004, 04:01 AM
bluephoenix's Avatar
bluephoenix bluephoenix is offline
Levelheaded Curmudgeon
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Location: Syracuse, NY
Posts: 508 bluephoenix User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 24 m 56 sec
Reputation Power: 3
Send a message via AIM to bluephoenix
RE: Logins

depending on the scale of the application. If it's only a few pages then I'll do the authentication in the actual page.

If I have the form values being passed off to a seperate script for validation then I just use headers to redirect the user to the appropriate page immediately. I avoid the "You're now logged in" splash pages because I find them annoying.

Reply With Quote
  #8  
Old January 23rd, 2004, 08:36 PM
Andrew's Avatar
Andrew Andrew is offline
Moderator
Click here for more information
 
Join Date: Apr 2007
Location: United Kingdom
Posts: 1,947 Andrew User rank is Private First Class (20 - 50 Reputation Level)Andrew User rank is Private First Class (20 - 50 Reputation Level)  Folding Points: 2429 Folding Title: Novice Folder
Time spent in forums: 4 Days 6 h 10 m 55 sec
Reputation Power: 4
RE: Logins

Splash screens in general are annoying they where king of websites when the internet first came out and aparently today 45% of people who see a splash screen dont hit enter they just click close on their browser according to a recent survey (i found out in a internet magasine)

Reply With Quote
  #9  
Old January 23rd, 2004, 11:39 PM
nawlej nawlej is offline
Contributing User
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: Dallas, Tx. USA
Posts: 2,008 nawlej User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 h 7 m 51 sec
Reputation Power: 5
RE: Logins

Thats why ya only use them for people who need to get behind it for information.

Reply With Quote
  #10  
Old January 24th, 2004, 10:12 PM
Andrew's Avatar
Andrew Andrew is offline
Moderator
Click here for more information
 
Join Date: Apr 2007
Location: United Kingdom
Posts: 1,947 Andrew User rank is Private First Class (20 - 50 Reputation Level)Andrew User rank is Private First Class (20 - 50 Reputation Level)  Folding Points: 2429 Folding Title: Novice Folder
Time spent in forums: 4 Days 6 h 10 m 55 sec
Reputation Power: 4
RE: Logins

True the things i hate are these fancy flash navigation bars that play a short movie of sound effects and graphics fading in and out before the nav buttons load. I mean i dont want to sit there watching some set of graphics fading in and out for the good of my health. I want to use the site.

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesProgramming Theory > Logins


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




 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

Request Your Free Technology Downloads!
 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

Request Your Free Technology Downloads!
 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

Request Your Free Technology Downloads!
 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

Request Your Free Technology Downloads!
 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

Request Your Free Technology Downloads!
 

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




© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 1 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek