Bonjour, je suis nouveau sur ce forum et en même temps je débute dans le développement web.

J'ai actuellement un problème sur une page dans la laquelle je génère en AJAX un tableau html contenant des informations en provenance d'une base, ces informations contiennent une liste de villes avec code postal,nom etc... et sont modifiables.

Voici le code de ma requête :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
 
function fillDiv(){
 
		if(city.value == "" && select_region.value == "")return;
		if(city.value != "" && select_region.value != "")return;
 
 
		var xhr = getXMLHTTP();
 
 
		xhr.open("GET","http://keltravo03/reponse.php?city="+city.value+"&reg_id="+select_region.value+"&district_id="+select_district.value,true);
 
		xhr.onreadystatechange = function (){
 
			if(xhr.readyState == 4 && xhr.status == 200){
 
				try{
					var response = xhr.responseXML;
 
 
					var size = response.getElementsByTagName('size').item(0).firstChild.data;
					var string ="<table style='background:#FFFF99'>";
 
					for(var i = 0; i < size-1; i++){
						city_id = response.getElementsByTagName('city_id').item(i).firstChild.data;
						string +="<tr onmouseover='this.style.background=\"#CCCCCC\";' onmouseout='this.style.background=\"#FFFF99\";'>";
						string +="<td>"+city_id+"&nbsp;";
						string +="<input type='hidden' name='infocity[city_id"+i+"]' id='city_id"+i+"' value='"+city_id+"' />";
						city_lowername = response.getElementsByTagName('city_lowername').item(i).firstChild.data;
						string += "<td>Ville:</td><td><input type='text' name='infocity[city_lowername"+i+"]' id ='city_lowername"+i+"' value="+city_lowername+" /></td>";
						city_postcode = response.getElementsByTagName('city_postcode').item(i).firstChild.data;
						string +="<td>Code&nbsp;postal:</td><td><input type='text' name='infocity[city_postcode"+i+"]' id='city_postcode"+i+"' value="+city_postcode+" /></td>";
						city_latitude = response.getElementsByTagName('city_latitude').item(i).firstChild.data;
						string +="<td>Latitude:</td><td><input type='text'name='infocity[city_latitude"+i+"]' id='city_latitude"+i+"' value="+city_latitude+" /></td>";
						city_longitude = response.getElementsByTagName('city_longitude').item(i).firstChild.data;
						string +="<td>Longitude:</td><td><input type='text' name='infocity[city_longitude"+i+"]' id='city_longitude"+i+"' value="+city_longitude+" /></td>";
						city_validation = response.getElementsByTagName('city_validation').item(i).firstChild.data;
 
						checkarray[i] = new Array();
 
						if(city_validation == "0"){
							checkarray[i][0]=createCheckbox('checkval'+i,'checkval'+i,'checked',i);
							checkarray[i][1]=createCheckbox('checkwait'+i,'checkwait'+i,'',i);
							checkarray[i][2]=createCheckbox('checkdeval'+i,'checkdeval'+i,'',i);
							string+="<input type='hidden' name='infocity[city_validation"+i+"]'id='city_validation"+i+"' value='0' />";
						}
						else if(city_validation == "1"){
							checkarray[i][1]=createCheckbox('checkwait'+i,'checkwait'+i,'checked',i);
							checkarray[i][0]=createCheckbox('checkval'+i,'checkval'+i,'',i);
							checkarray[i][2]=createCheckbox('checkdeval'+i,'checkdeval'+i,'',i);
							string+="<input type='hidden' name='infocity[city_validation"+i+"]'id='city_validation"+i+"' value='1' />";
						}
						else if(city_validation == "2"){
							checkarray[i][2]=createCheckbox('checkdeval'+i,'checkdeval'+i,'checked',i);
							checkarray[i][1]=createCheckbox('checkwait'+i,'checkwait'+i,'',i);
							checkarray[i][0]=createCheckbox('checkval'+i,'checkval'+i,'',i);
							string+="<input type='hidden' name='infocity[city_validation"+i+"]'id='city_validation"+i+"' value='2'/>";
						}
 
						string +="<td>Validé:</td><td>"+checkarray[i][0]+"</td><td>En&nbsp;attente:</td><td>"+checkarray[i][1]+"</td><td>Dévalidé:</td><td>"+checkarray[i][2]+"</td>";
						string +="</tr>";
					}
 
					string +="</table>";
					resultsearch.innerHTML = string;
					validcity.style.display = "block";
 
				}catch(e){
					validcity.style.display="none";
				}
			}
		};
 
		xhr.send(null);
	}
et le code après validation du formulaire qui me permet de récupérer les informations pour pouvoir faire mes UPDATE dans la base :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
 
if(isset($_POST['infocity'])){
					print_r($_POST['infocity']);
					$infocity = array();
 
					if(!empty($_POST['infocity'])){
						$infocity = $_POST['infocity'];
 
					}
				}
Les informations à envoyées à PHP sont contenu dans le tableau infocity seulement voila lorsque je soumet le formulaire après modification je ne reçoit pas le $_POST['infocity'], j'ai eu beau chercher mais je n'ai pas trouvé de solution .