Ok, I've updated all files in /src directory, now all the files are in the /src directory are included with my project. Check it here: http://www.sgpaste.tk/src/ and fix my problem... And my project includes following files: a.i) login.php (only html form/page1) a.ii) validate_login.php (for validation) a.iii) functions.php (functions used in login.php and validate_login.php) a.iii) login.func.php (function used in login.php) b.) mpanel.php (members area/page2) first of all user goes to "login.php" and enters his/her login details then, the "validate_login.php" validates/checks if the details are exists in database. If matches then, if the use has checked the 'Automatic Login' (checkbox) then, the "validate_login.php" sets cookies for username, password & autologin and redirects the user to "mpanel.php", or if 'Automatic Login' (checkbox) has not checked then, the "validate_login.php" deletes the cookies, registers session for username & password and redirects the user to "mpanel.php".