wt will be the code like???
Hi,
First of all you need a database with a table in it that stores the user credentials.
Second you need a login page. This normally includes a form with a post method. The desitination page, as set by the action on the form, would check the credentials entered are for a valid user and if so when they last logged in. If the credentials are invalid then you need to report in this to the visitor.
Third, based on the the current time and the last logged in time the user who sucesfully logs in can be presented with a specific message. This would go on the the page the login form specifies as the form action.
That's the general principle. I will be doing something like this very shortly but that the design I have mapped out. I am not going to write my module and then give you the code, however if you have a go and post any code you get stuck with I will help out.
It is worth reading through some tutorials on php and database:
Data Abstraction Layer W3Schools
These are both excellent, I use them all the time.
Cheers
nathj