8eec3f20e5c9321700aa619d8e64621f9169df82
4 if( $id = mysql_connect($_SERVER['dbHost'],$_SERVER['dbLogin'],$_SERVER['dbPass']) ) {
5 if( $id_db = mysql_select_db($_SERVER['dbBd']) ) {
6 echo 'Connexion a la base.<br><br>';
7 $requete = "SELECT NumCl, NomCl, CodePosteCl, VilleCl FROM CLIENTS";
8 if($result = mysql_query($requete)) {
9 echo "<table border=1>\n";
10 echo "<tr><td>Code_CL</td><td>Nom</td><td>Rue</td><td>Ville</td></tr>\n";
11 while($ligne = mysql_fetch_row($result)) {
16 echo "<tr><td>$code</td><td>$nom</td><td>$rue</td><td>$ville</td></tr>\n";
20 echo 'Erreur de requete';
23 die('Echec de connexion a la base');
26 echo '<br>Deconnexion.';
28 die('Echec de connexion au serveur de bases de donnees');