php code for login and logout. you can create a database called login and and create the table named as user, fields of the table will be according to the code that mentioned here