Solved

php ajax login system

Posted on 2010-09-20
4
487 Views
Last Modified: 2012-08-13
can u give me example of login script using php, mysql and ajax.

i am using sha1, but i don't know how to use salt. if possible can u explain me how do add salt and match it with password in db, but it is secondary ... main thing i wanna know is ajax login .. thanks loads :)
0
Comment
Question by:nandananushil1
  • 4
4 Comments
 
LVL 6

Accepted Solution

by:
Ludwig Diehl earned 500 total points
ID: 33719502
Here I have made an example for u. It is very simple however it achieves what u want. About salting, let me give an example later.. cheers
php-ajax-login-system.zip
0
 
LVL 6

Expert Comment

by:Ludwig Diehl
ID: 33719517
ohh I forgot to attach th db dump file.
db-login.zip
0
 
LVL 6

Expert Comment

by:Ludwig Diehl
ID: 33719633
0
 
LVL 6

Expert Comment

by:Ludwig Diehl
ID: 33720036
base on the link I sent...
I have modified it in order to make it a little bit stronger...You can try to get it even stronger. I suggest u use as a salt, the username for instance..or some whatever u want.
function generateHash($sPlainText,$sSalt)
{    
    $aPlainText     = str_split($sPlainText);
    $sPlainText     = '';
    foreach($aPlainText as $sChar)
    {
        $sPlainText.= $sSalt.$sChar;                     
    }
    $sPlainText=sha1($sPlainText);
    return $sPlainText;
}

Open in new window

0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
This article discusses how to create an extensible mechanism for linked drop downs.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question