注意:未定义的索引:用户名36-37

时间:2019-05-03 07:49:12

标签: php undefined username notice

注意:未定义的索引:第36行的C:\ xampp \ htdocs \ index.php中的用户名

注意:未定义索引:第37行的C:\ xampp \ htdocs \ index.php中的密码

<?php 

include("setting.php");
ob_start();
session_start();


$username = $_POST['username'];
$password = $_POST['password'];

$sql_check = mysqli_query($con,"select * from uyeler where 
username='".$username."' and password='".$password."' ") or 
die(mysqli_error($con));

if(mysqli_num_rows($sql_check))  {
$_SESSION["login"] = "true";
$_SESSION["user"] = $username;
$_SESSION["pass"] = $password;
header("Location:admin.php");
}


if($username=="" or $password=="") {
    echo "";
}

else {
      echo "<script>alert('Hatalı Giriş 
Yaptın!');window.location='index.php'</script>";
     }

ob_end_flush();

?>

0 个答案:

没有答案