Current location: Hot Scripts Forums » Programming Languages » Perl » A login page


A login page

Reply
  #1 (permalink)  
Old 04-19-04, 10:29 AM
grayfox grayfox is offline
New Member
 
Join Date: Mar 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
A login page

Hi everybody,

I want to make a login page in perl, that checks the username and password
and then redirects the person (user) to a page after a succesfull login.
If the username and/or password is not correct an error page will open.

I want to use a database to store the username and password (Oracle, MysQL) or in a simple text file.

I have a problem, I don't know how to start. Can someone help me.
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 04-19-04, 11:01 PM
Skeleton Man Skeleton Man is offline
Community Liaison
 
Join Date: Jun 2003
Location: Australia
Posts: 406
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by grayfox
Hi everybody,

I want to make a login page in perl, that checks the username and password
and then redirects the person (user) to a page after a succesfull login.
If the username and/or password is not correct an error page will open.

I want to use a database to store the username and password (Oracle, MysQL) or in a simple text file.

I have a problem, I don't know how to start. Can someone help me.
1. Create a very basic form for entering username and password.
2. Check if a username and password has been supplied to the script.
3. If no username or no password, print out the above form and exit.

4. If a username and password are sent:

a. Read a list of users from the file (for simplicity we'll say a text file, one user per line)
b. Check if the username and password combo match any of the above.

5. If the username and password are correct, redirect to the appropriate page, otherwise print an error message and exit.


The above is a very simple set of steps for what you are wishing to accomplish, it should get you thinking and give you somewhere to start. If you get stuck with the code, post what you have and I'll try and give you a few pointers.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 04-20-04, 10:54 AM
grayfox grayfox is offline
New Member
 
Join Date: Mar 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Thank You

Quote:
Originally Posted by Skeleton Man
1. Create a very basic form for entering username and password.
2. Check if a username and password has been supplied to the script.
3. If no username or no password, print out the above form and exit.

4. If a username and password are sent:

a. Read a list of users from the file (for simplicity we'll say a text file, one user per line)
b. Check if the username and password combo match any of the above.

5. If the username and password are correct, redirect to the appropriate page, otherwise print an error message and exit.


The above is a very simple set of steps for what you are wishing to accomplish, it should get you thinking and give you somewhere to start. If you get stuck with the code, post what you have and I'll try and give you a few pointers.
Thank you for the reply. I'll let you know if I get stuck, because I think I may have to work woth sessions too.

Thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks

« Perl help | dbmopen »

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
Classified Ads skipper23 Perl 3 11-22-05 03:22 AM
page browsing problem mivec PHP 3 04-17-04 04:43 AM
login page Mister B. PHP 8 04-10-04 02:45 PM
Header Warnings are gone, but page still does not work correctly stscac PHP 0 02-16-04 12:02 PM
Classified Ads skipper23 Perl 2 12-30-03 04:43 AM


All times are GMT -5. The time now is 07:58 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.