$_POST["nom"], "birthDate" => $_POST["bdate"], "deathDate" => $_POST["ddate"], "image" => $_POST["imgurl"], "description" => $_POST["description"] ); $actuel = file_get_contents('../personnages.json'); $listeTemp = json_decode($actuel, true); print_r($listeTemp["historicalFigures"]); array_push($listeTemp["historicalFigures"], $newperso); $donneesJson = json_encode($listeTemp); file_put_contents('../personnages.json', $donneesJson); header("Location: ../persos.php"); }