I have a problem with my form (made with jquery, php, html) when submitting:
<?php
$pass ="password";
$login = "login";
$t = array();
$t["error"]="Formulaire Incorrect";
if($_POST["login"]!= $login){
$t["errorLogin"] = "Identifiant Invalide!";
}
else{
if($_POST["password"]!=$pass){
$t["errorPass"]="Mot de pass incorrect!";
}
else{
$t["error"]="no";
$t["retour"] = "<p>Informations validées</p>!";
}
}
echo json_encode($t);
?>
jquery-1.12.4.min.js:4 Access to XMLHttpRequest at 'file:///C:/Users/Medinfo/Desktop/JQUERY/JSON/check.php' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https.