Forum Moderators: coopster
If you wanted to log all attempts (perhaps worthwhile, depending on your security needs), then create a table called login_attempts and store every attempt. Then, to display the last login, you just do a select on that table with a LIMIT 1,1 to skip the current login.
I hope that's enough detail for you to get started on the code. If you run into trouble, just post back your code snippets and we'll take a look. :)