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 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90
|
<div id="colonnereponsetitre"></div>
<div class="palatino14gris" id= "colonnereponse">
<?php
$sql = 'SELECT * FROM dormir WHERE 1=1 ';
if (isset ($_POST['homme'] )) {
$sql .= " AND homme = 1 ";
}
if (isset ($_POST['femme'] )) {
$sql .= " AND femme = 1 ";
}
if(isset ($_POST['couple'] )) {
$sql .= " AND couple = 1 ";
}
if (isset ($_POST['animaux'] )) {
$sql .= " AND animaux = 1 ";
}
if (isset ($_POST['enfants'] )) {
$sql .= " AND enfants = 1 ";
}
if(isset ($_POST['foyer'] )) {
$sql .= " AND foyer = 1 ";
}
if (isset ($_POST['chambre'] )) {
$sql .= " AND chambre = 1 ";
}
if(isset ($_POST['logement'] )) {
$sql .= " AND logement = 1 ";
}
$req = mysql_query($sql) or die('Erreur SQL !<br />'.$sql.'<br />'.mysql_error());
//on organise $req en tableau associatif $data['champ']
//en scannant chaque enregistrement récupéré
//on en profite pour gérer l'affichage
//boucle
while ($row_Rsselogerreponses = mysql_fetch_array($req))
{
// on affiche les résultats
echo '<p></p>'; ?>
<a class ="palatino16blanc"><a href="selogerreponsesancienagarder.php?id=<?php echo $row_Rsselogerreponses['id']; ?>"><?php echo $row_Rsselogerreponses['nom']. '<br />'; ?></a></a>
<a class ="palatino14gris" ><?php echo $row_Rsselogerreponses['adresse'].'<br />' ;?></a>
<a class ="palatino14grisitalic" > <?php echo '________________________________ '?></a>
<?php echo " ",'<br />';}?></div>
<div id="colonnereponsedetailleetitre"></div>
<div class="palatino14gris" id="colonnereponsedetaillee">
<?php echo
'<p></p>',
$row_Rsreponsedetails['nom'].'<br />',
$row_Rsreponsedetails['adresse']. '<br />',
$row_Rsreponsedetails['contact']. '<br />',
'<p></p>',
"Bénéficiaires : ",$row_Rsreponsedetails['beneficiaires'].'<br />',
"Heures d'ouverture : ",$row_Rsreponsedetails['heuresdouverture'].'<br />',
'<p></p>',
"Plan :", '<br />',
$row_Rsreponsedetails['map'].'<br />' ; ?>
</div>
</div>
<?php mysql_free_result ($req);
//On ferme sql
mysql_close (); ?>
<?php
mysql_free_result($Rsselogerreponses);
mysql_free_result($Rsreponsedetails);
?> |
Partager