Simpla Admin

" id="show_login_err">

" maxlength="15" class="text-input">

" maxlength="50" class="text-input">

Remember me

0) { #==========set cookie=============== if($_REQUEST['check_cook'])// This section for remember me { $Month = 86400 + time(); //this adds 30 days to the current time setcookie("user_name",$login_row['username'], $Month); setcookie("pwd",$login_row['password'] , $Month); } #===== end set Cookie ============== //session_register("admin_user_id"); //session_register("admin_username"); $_SESSION['admin_username'] = $login_row['username']; $_SESSION['admin_user_id'] = $login_row['login_id']; $_SESSION['first_name'] = $login_row['fname']; $_SESSION['last_name'] = $login_row['lname']; $_SESSION['member_type'] = $login_row['member_type']; header("location: admin_main.php"); } else{ $_SESSION['err_msg'] = "Invalid User Name or Password."; $GLOBALS['err_msg']="Invalid User Name or Password."; header("location:index.php"); exit; } } function logout(){ if($_SESSION['admin_user_id']) { $_SESSION['admin_user_id']=""; $_SESSION['admin_username']==''; unset($_SESSION['admin_user_id']); unset($_SESSION['admin_username']); session_destroy(); } $GLOBALS['err_msg']="You are Logged Out."; //disphtml("showLogin();"); header("location:index.php"); exit; } ?>