I'm new to user authentication. And I have a few questions as to how best to do it.
What I already have is a user registration form with all the require details - this then goes into a MySQL database after being verified.
I also have a login form which tests if the username and password are correct - at the moment this just returns "Login OK" or "Login Failed".
I know that for "Login OK" I need to write a cookie.
What do I do from here ? This is where I have my problems !
1) How can I securely login the user ?
2) How do I redirect the user to the main members page ?
3) How can you load the members details and preferences into that main members page ?
4) Should you use sessions ? If so is there a good beginners guide to using these.
5) Would .htaccess type login be more secure or easier to implement ?
If anyone can answer any of the above questions I would be very appreciative !
Thanks
Fred