Exception or error:
<?php
include 'conn.php';
$name = $_POST['Name'];
$password = $_POST['password'];
$queryResult=$connect->query("SELECT * FROM test WHERE Name='$name'");
$result=array();
while($fetchData=$queryResult->fetch_assoc()) {
$result []=$fetchData;
}
echo json_encode($result);
?>
The above code shows the error:
Notice: Undefined index
How to solve: