Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 02-20-2003, 07:38 PM   #1 (permalink)
xxm116xx
Registered User
 
Join Date: Feb 2003
Posts: 4
xxm116xx is on a distinguished road
how do u create login pages??

i reaaallly could use ur help on this
xxm116xx is offline   Reply With Quote
Old 02-20-2003, 11:09 PM   #2 (permalink)
saline
I am red.
 
saline's Avatar
 
Join Date: Feb 2003
Location: Cleveland, OH
Posts: 139
saline is on a distinguished road
first piece of advice.

Although I'm probably not going to be able to help you I'm willing to bet if you could provide more information other people would be able to assist you more easily.

I assume this is for a web page? Do you need a password or does it not need be secure? Is there anything special that needs to happen with the logins?

So if you help them it'll be easier for them to help you.
saline is offline   Reply With Quote
Old 02-20-2003, 11:18 PM   #3 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,532
sde is on a distinguished road
usually with a login, you will have to use sessions or cookies. you can make a simple login that directs between 2 pages on success or failure without cookies or sessions, .. however nothing would prevent the user from typin the address of the successful redirect into the browser.

a login script is a fairly common script and i am thinking i may write a tutorial here on it.
sde is offline   Reply With Quote
Old 02-21-2003, 07:49 AM   #4 (permalink)
Admin
$_['Your_Mom'];
 
Admin's Avatar
 
Join Date: May 2002
Location: Santee
Posts: 627
Admin is on a distinguished road
.htaccess

w00t
__________________


Urban Clothing
Admin is offline   Reply With Quote
Old 02-21-2003, 11:24 AM   #5 (permalink)
joe_bruin
LOAD "*",8,1
 
Join Date: Feb 2003
Location: la.ca.us
Posts: 254
joe_bruin is on a distinguished road
creating a login page is pretty easy. create a form with a name and password field and submit it to your verify page. the verify page should compare the hashed password in your database to the one submitted. (you are hashing your passwords, right? with a salt?)

that's the easy part.

the hard part is enforcing your authentication. sessions has been brought up, and is probably the easiest way.

Quote:
however nothing would prevent the user from typin the address of the successful redirect into the browser.
not true: the verification page sets the proper session variables / cookies, so if a user is not authenticated, the 'success' page (and any other page requiring login) would reject the user.

using htaccess is a pain because you have to make sure your .ht files are in sync with the user database (you may have multiple webservers), it requires passing the password on every single page request (making it impossible to switch to a non-ssl connection after authentication), and it is not designed to handle large volumes of users (seeking through the access files does not scale well).
joe_bruin is offline   Reply With Quote
Old 02-21-2003, 12:05 PM   #6 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,532
sde is on a distinguished road
joe, my redirect statement you quoted was taken out of context. if you quoted the part before the comma, it would make sense. i was referring to using that type of authentication without sessions or cookies.
sde is offline   Reply With Quote
Old 02-21-2003, 12:10 PM   #7 (permalink)
joe_bruin
LOAD "*",8,1
 
Join Date: Feb 2003
Location: la.ca.us
Posts: 254
joe_bruin is on a distinguished road
oops, my bad.
joe_bruin is offline   Reply With Quote
Old 02-21-2003, 11:13 PM   #8 (permalink)
xxm116xx
Registered User
 
Join Date: Feb 2003
Posts: 4
xxm116xx is on a distinguished road
the thing i wanna do is like, lets say, nintendo.com , theres a login page, to access ur info page, and edit ur stuff with a profile n other things like that, how do i do that
xxm116xx is offline   Reply With Quote
Old 02-22-2003, 12:11 AM   #9 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,532
sde is on a distinguished road
xxmm .. do you know any php at all?
sde is offline   Reply With Quote
Old 02-22-2003, 11:55 AM   #10 (permalink)
xxm116xx
Registered User
 
Join Date: Feb 2003
Posts: 4
xxm116xx is on a distinguished road
nope . .
xxm116xx is offline   Reply With Quote
Old 02-22-2003, 01:32 PM   #11 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,532
sde is on a distinguished road
just a bit of advice, .. try something more simple if you want to learn php. get used to the language before you try scripting database stuff. i highly recommend picking up a PHP book, .. such as one published by WROX "beginning PHP". that should get you started, .. then you can always ask questions here, .. but specific questions will more likely get you better results.

i love to help people learn to code, but i won't code for them.
sde is offline   Reply With Quote
Old 02-22-2003, 01:42 PM   #12 (permalink)
xxm116xx
Registered User
 
Join Date: Feb 2003
Posts: 4
xxm116xx is on a distinguished road
arite thanks
xxm116xx is offline   Reply With Quote
Old 02-24-2003, 11:04 AM   #13 (permalink)
Admin
$_['Your_Mom'];
 
Admin's Avatar
 
Join Date: May 2002
Location: Santee
Posts: 627
Admin is on a distinguished road
mike will code for beer though.
__________________


Urban Clothing
Admin is offline   Reply With Quote
Old 02-24-2003, 12:29 PM   #14 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,532
sde is on a distinguished road
so long as it is good beer.
sde is offline   Reply With Quote
Reply

Bookmarks

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
login session help please Namraw PHP 2 09-14-2004 04:26 PM
narrowed down login trouble trevor PHP 7 01-18-2003 06:50 PM


All times are GMT -8. The time now is 10:43 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0 RC8 ©2007, Crawlability, Inc.





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting