The problem is that I do not know how I can check that logeo. I currently do a query directly to a table, when there is perfect nothing happens, it shows me the information. when it does not exist it throws me the following error:
Unexpected '<'
my code in php:
<?php
if($_SERVER["REQUEST_METHOD"]=="POST"){
include('conexion.php');
header('Content-Type: application/json; charset=utf8');
$usuario= $_POST['usuario'];
$result = mysqli_query($con,"SELECT * from $usuario") or mysqli_error($con);
while ($row = $result->fetch_assoc()) {
$arr[] = $row;
}
$json = json_encode($arr,JSON_UNESCAPED_UNICODE);
echo $json;
}
?>