Or, if you donæt want to use cookies, and don't have php4 (read: the ability to use sessions), one could save the remote ip-address in a field in the users database along with a timeout-value. Then to check if someone is logged in, check if their ip is in the database, and if the timout has not been reached. If both these conditions are true, continue to load the page. If not, redirect the browser to some login-page. This login page, looks up the given username, and compares the given password with the stored one. If they match, save ip and a timeout value, ie 30 mins into the future.
Also in the ip-validation, you should update the timeout-value, so that the user wouldn't need to log on after 30 mins (or whatever value set) if he/she is active.
The problem is that someone using the same machine afterwards, would be recognized as the previous user, and could possibly access this users information.
This could be solved by creating a logout-script that sets the ip to NULL. Another solution is to set a reasonable timeout-value.
This problem, however, would also be present in the cookie approach.
Hope this helps.
Svein Halvor Halvorsen