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
| <div id="menu_gauche">
<?php
$serveur ="localhost";
$login = "root";
$mot_passe = "";
$base = "artkateo";
$connexion = mysql_pconnect($serveur, $login, $mot_passe) or die ("impossible de se connecter a MySQL : ".mysql_error());
$mabase = mysql_select_db($base) or die ("impossible de ce connecter ma table : ".mysql_error());
$requete = "select * from actualite";
$resultat = mysql_query($requete);
while ($row = mysql_fetch_row($resultat))
{
$titre = $row[1];
$date = $row[2];
$lieu = $row[3];
$resume = $row[4];
$image = $row[5];
echo '<div id="titre">'.$titre.'</div>';
echo '<div id="date">'.$date.'</div>';
echo '<div id="lieu">'.$lieu.'</div>';
echo '<div id="resume">'.$resume.'</div>';
echo '<div id="img">'<A HREF="#" onClick="window.open('.$image.','_blank','toolbar=0, location=0, directories=0, status=0, scrollbars=yes, resizable=1, copyhistory=0, menuBar=0, width=460, height=470');return(false)">Voir image</A>'</div>';
}
?>
</div> |
Partager