<?php
$tab = array();

$tab[0] = 'doe';
$tab[1] = 'dodo';


$username = $_POST['username'];
$password = $_POST['password'];
$trouve = "pasTrouve";

for ($i = 0; $i < sizeof($tab); $i += 2) {
  $y = $i;
  if ($username === $tab[$i] && $password === $tab[$y + 1]) {
    $trouve = "trouve";
  }
}

header('Content-type: text/plain');
echo $trouve;

//http_response_code( 200 );
//var_dump( http_response_code() );
