<?php
	require '../connect.php';
	$sql="SELECT id, nom, id_page FROM regions WHERE id_parent='".$_POST['id_parent']."' ORDER BY nom ASC";
	$result = mysql_query($sql, $link);
	while ($ligne = mysql_fetch_array($result, MYSQL_ASSOC)) {
		$nom=$ligne['nom'];
		$id=$ligne['id'];
		$id_page=$ligne['id_page'];
		echo '<a href="#" class="regions" onClick="detail_region('.$id.',0);affiche_texte('.$id.');return false;">'.$nom.'</a>';
		echo '<div id="communes'.$id.'"></div>';
	}
?>