this is the code example for Notice: Undefined index: submit in C:\wamp\www\payroll\index.php on line 39, can you help me sir via teamviewer?
if($_POST['submit']=='Login') { // Checking whether the Login form has been submitted $err = array(); // Will hold our errors if(!$_POST['username'] || !$_POST['password']) $err[] = 'All the fields must be filled in!'; if(!count($err)) { $_POST['username'] = mysql_real_escape_string($_POST['username']); $_POST['password'] = mysql_real_escape_string($_POST['password']); $_POST['rememberMe'] = (int)$_POST['rememberMe']; // Escaping all input data $row = mysql_fetch_assoc(mysql_query("SELECT * FROM user WHERE username='{$_POST['username']}' AND password='".md5($_POST['password']."NizarRahmat")."'")); if($row['username']) { // If everything is OK login $_SESSION['blocked'] = $row['blocked']; // Store some data in the session if($_SESSION['blocked'] == 0) { $_SESSION['userid']= $row['userid']; $_SESSION['username'] = $row['username']; $_SESSION['accessid'] = $row['accessid']; $_SESSION['rememberMe'] = $_POST['rememberMe']; setcookie('tzRemember',$_POST['rememberMe']); } else $err[]='User is blocked! please contact Administrator!!'; } else $err[]='Wrong username and/or password!'; } if($err) $_SESSION['msg']['login-err'] = implode('<br />',$err); // Save the error messages in the session header("Location: index.php"); exit; }