Hello i m using an ajax function to get back the goog day from a script on my php file ... It' not working i don't understand why, please help i need ajax dont want to reload each time a date is picked in my php calendar
my HTML is
<p class="texte choixDate"></p>
so my jquery code is
$("#calendrier td a").click(function(){
var jour=$(this).text();
var mois="<?php echo $mois2;?>";
var annee="<?php echo $year;?>";
$.ajax({
url : 'requete.php',
type : 'GET',
data : 'jour='+jour+'&mois='+mois+'&annee='+annee,
dataType : 'text',
success : function(text){ // code_html contient le HTML renvoyé
$(".texte.choixDate").empty();
$(".texte.choixDate").append("<i class='fa fa-arrow-circle-down fa-2x' aria-hidden='true'></i><br/>Vous avez choisi le " + text + " " + jour + " " + mois + " " + annee +"<br/><br/><a class='btn' href='accueil.php?val2=1#agenda1' title='Valider'>Valider</a>");
}
});
});
and my php file is
$semaine = array("Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi","Dimanche");
$mois=$_GET["mois"];
$jour=$_GET["jour"];
$annee=$_GET["annee"];
$moisAtester2= mktime(0,0,0,$mois,$jour,$annee);
$jourSem=$semaine[date("w",$moisAtester2)];
echo $jourSem;
THANKS FOR HELP !!