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
Go Back   Code Forums > Application and Web Development > PHP
User Name
Password

Reply
 
LinkBack Thread Tools Display Modes
Old 02-20-2003, 06: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, 10: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, 10:18 PM   #3 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,397
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, 06: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, 10: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, 11:05 AM   #6 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,397
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, 11:10 AM   #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, 10: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-21-2003, 11:11 PM   #9 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,397
sde is on a distinguished road
xxmm .. do you know any php at all?
__________________
sde is offline   Reply With Quote
Old 02-22-2003, 10: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, 12:32 PM   #11 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,397
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, 12: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, 10: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, 11:29 AM   #14 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,397
sde is on a distinguished road
so long as it is good beer.
__________________
sde is offline   Reply With Quote
Reply


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

vB 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 03:26 PM
.htaccess -- Custom Error Pages v1.1 DavH27 HTML / CSS 0 08-26-2004 04:40 PM
Login With Sessions sde PHP 1 08-16-2003 03:20 PM
Validating Your Pages With the W3C Markup Validator verto HTML / CSS 0 08-11-2003 06:17 PM
narrowed down login trouble trevor PHP 7 01-18-2003 05:50 PM


All times are GMT -8. The time now is 06:31 PM.


Powered by vBulletin Version 3.6.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2006, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting
Open Circle