Google for php login systems / session management. It'll help you find good resources on building a login system.
Also be sure to research MySQL injection, you will want to ensure all your user-input variables are secure and non-injectable.
If you have a Windows host, you can always code your site in ASP.NET as well since you are already familiar with C#/VB.NET from what you said and your signature. You can still use a MySQL database with it as well.
Look into using session information on the server side. It'll be able to do all of this for you.
Just be careful with how you handle the sessions / cookies because you can do session and cookie injection too if you do not do things securely.
Using session variables straight from the PHP $_SESSION object can lead to injections and unwanted access on your site. You are better off storing session information in a database and only giving users a session token in a cookie. Have the session information in the database store who owns the session and so on server sided so users do not have access to edit the session vars locally.
Sending them a cookie with a user id, user name, etc. is just asking to get hacked.