Firs you need to know basics about HTML and PHP to get this working correctly. I will suggest you check out my Login and Logout using Sessions and Cookies articles which does very basic of what you are trying to do.
jose_peeterson like this