Thursday, February 2nd, 2006

An Ajax Login System (with Help from PHP)

Category: Ajax, JavaScript, PHP, Programming, XmlHttpRequest

Evolt.org has posted this tutorial on the creation of a login system by combining the powers of PHP and Ajax. The idea is to keep the user on the same page until they are fully authenticated. As it stands now, most pages have to resubmit the data to a handler where it might be rejected or accepted. Either way, it saves the extra page load time and makes it a more “seamless” experience for the user.

The Internet is finally truly going stateless, and the challenge posed now by the adaptive path article is as follows: to forget what we think we know about the limitations of the Web, and begin to imagine a wider, richer range of possibilities.

In that regard, I started a project on the weekend that I wasn’t sure was possible: creating a fully secure “ajax”-powered login system, ideal for blogs, forums, and other similar sites. I had a barebones secure case working within a few hours, and a few more hours gave the final result that I will share today.

The tutorial itself only explains things and a higher level, not really diving much into the code. This page is where all of the good stuff lives. They provide the HTML, the CSS, and all of the Javascript you’ll need to get it up and running, including the PHP script to run the authentication off of the server (using MySQL as a storage method).

Posted by Chris Cornutt at 10:54 am
9 Comments

+++--
3.8 rating from 145 votes

9 Comments »

Comments feed TrackBack URI

This is some of the buggiest, crappiest AJAX code I’ve seen yet.

Comment by Christian Bradley — February 5, 2006

This is a Thest

Comment by joe — February 13, 2006

Restitution

Comment by sdf — February 13, 2006

Hello, xin chao

Comment by Nguyen Thanh Tung — February 24, 2006

sdaf

Comment by test — April 25, 2006

testestest

Comment by 232323 — June 20, 2006

Why oh why would you not have a submit button on a login script? People are used to using submit buttons and have been doing since the web began. You’ll just piss people off without one.

Comment by Tom — March 27, 2007

Nice idea -would have security and usability concerns…. Aran

Comment by Aran — April 9, 2007

Hi this is a good stutorial to learn how to using php and ajax in your app.
Thanks so mục, hope have more like this.

Comment by Nguyá»…n Minh SÆ¡n — October 28, 2007

Leave a comment

You must be logged in to post a comment.