1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
<?php
$VilleVilla = $_POST['VilleVilla'];
// on se connecte à notre base
$connexion = mysql_connect("localhost","","" );
mysql_select_db("Villa",$connexion);
//choisi par ville
$sql = "SELECT * FROM villa WHERE VilleVilla = '$VilleVilla'";
$requete = mysql_query($sql) or die('Erreur SQL !<br>'.$sql.'<br>'.mysql_error());
while ($ligne = mysql_fetch_array($requete))
{
echo "<h3>Présentation des gîtes</p>" ;
echo "<table BORDER=\"1\">" ;
echo "<tr><th>NoVilla</th><th>Rue</th><th>CP</th><th>Ville</th><th>Places</th><th>Chambres</th><th>Surface</th><th>Jardin</th></tr>";
echo "<tr><td>".$ligne['NoVilla']."</td><td>".$ligne['RueVilla']."</td><td>".$ligne['CPVilla']."</td><td>".$ligne['VilleVilla']."</td><td>".$ligne['NbPlaces']."</td><td>".$ligne['NbChambres']."</td><td>".$ligne['Surface']."</td><td>Oui</td></tr>";
echo "</table>";
echo "<hr>";
}
echo "Aucun résultat ne correspond à votre recherche" ;
mysql_close();
?> |
Partager