0) { $row = mysqli_fetch_assoc($queryResult); $_SESSION['uname'] = $myusername; $_SESSION['pass'] = $mypassword; //header("Location:index2.php?userid=$myusername"); echo ''; } else { $msg = 'Invalid username or password !'; echo ""; }