Perl Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPerl Programming

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 Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old July 13th, 2000, 01:01 AM
chinnavi
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:

i need help in getting nice Login in checking the Login name and password Check Script ?.
The Script has to do the following things ...

i have a form for login name and password ...
the script has to check whether the login name exists and then check for password ..

I already wrote the script and i need some help from genius persons to help me in getting better script.

I adopted following logic.

1. Get the Login AND password from Form.
2. Check For Login Whether Exists.
3. If Login Exists Check for Password correct or not ?
4.If NOLOGIN --->Throw Form again with error?
5.If Password ERROR --->Thro the Same Form with Error.

Anybody with better logic and performance please do help me to upgrade the logic.

vijay

Reply With Quote
  #2  
Old July 13th, 2000, 02:19 AM
Shiju Rajan's Avatar
Shiju Rajan Shiju Rajan is offline
.Net Developer
Dev Shed Novice (500 - 999 posts)
 
Join Date: Feb 2000
Location: London
Posts: 987 Shiju Rajan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 26 m 22 sec
Reputation Power: 9
Send a message via MSN to Shiju Rajan Send a message via Yahoo to Shiju Rajan
Vijay,

Here is a very small suggestion from me..

here is my suggestion:

1. Get the Login AND password from Form.
2. Check For Login and Password Whether Exists.
3.If both are not matching ...Thro the Same Form with Error "Login Failed"...

-----
that is the straight and easy way..




------------------
SR -
webshiju.com

"The fear of the LORD is the beginning of knowledge..."

Reply With Quote
  #3  
Old July 13th, 2000, 03:38 AM
freebsd
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
>>Anybody with better logic and performance please do help me to upgrade the logic.

Your logic seems great. However, you seem to be using clear-text password. So are there any database involved? Or htaccess?

If htaccess, you need not to worry about the authentication for login at all. For registration, you probably do need to following logic..

1) Get username from Form
2) Check username existence
3) If exists, send a "last" so it save some time reading thru the entire username record
4) If not exist, continue the other process

Reply With Quote
  #4  
Old July 13th, 2000, 04:43 PM
yosuNIC yosuNIC is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2000
Posts: 1 yosuNIC User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to yosuNIC
If you're using a db such as mySQL, then u have to pay attention to how you set up your db... I went thru the same problem about a week ago, and it turned out my php3 scripting was correct, only I'd mis-setup my db. URL

------------------

Yosun Chang
CEO NuSoy netMages
www.nusoy.com

Reply With Quote
  #5  
Old July 14th, 2000, 02:55 AM
chinnavi
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
i m using mysql and perl dbi ...
---->
ChinnaVi $ mysql -V
mysql Ver 9.36 Distrib 3.22.27, for pc-linux-gnu (i686)
ChinnaVi $
---->

i didnt face any problem setting up the db ..
Can you please tell me your problem so that i will check i have any problem in my script .

I wanna store as encrypted user name and password in mysql ... any body is having any idea about encryption?

vijay

Reply With Quote
  #6  
Old July 15th, 2000, 03:18 PM
ledjon
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
I'm not into mysql/perl stuff.. I use php with mysql. But as far as the encryption goes:

#######
crypt("$password", xx)
#######

$password is the plain text you want encrypted. "xx" is a 2 letter key that it used as encryption keys. They can be any two letters. If you want to set it to a variable to put into the database just use:
#######
$var = ("$password", xx);
#######
If you then need to compare an input password the one in the database you have to do it like this (since you can't decrypt a password):

#######
if (crypt("$INPUT{password}", xx) eq $database_password) {&blah} else {&blahblah}
#######

That should all work fine.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPerl Programming > Login Check Logic ?


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


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





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway