?
Solved

php ajax login system

Posted on 2010-09-20
4
Medium Priority
?
493 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
4 Comments
 
LVL 6

Accepted Solution

by:
Ludwig Diehl earned 2000 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

These days socially coordinated efforts have turned into a critical requirement for enterprises.
This article discusses four methods for overlaying images in a container on a web page
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to count occurrences of each item in an array.
Suggested Courses

801 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