Login page not working in Codeigniter


Hi im trying to make a login page but im not able to run it properly. when i enter username and password it automatically loads back to login page. I have some other problems that i'm not sure it it is checking username and password form database before getting logged in or not and some issues with sessions. I need your help please and here is my code

Model file


db->select('id username