<?php
$dbhost="localhost";
$dblogin="root";
$dbpassword="";
$dbname="intranet";
//recupere le contenu du champs du fichier MenuSql.php
$nom = $HTTP_POST_VARS["liste1"];
mysql_connect($dbhost,$dblogin,$dbpassword);mysql_selectdb($dbname);
$sql_results = mysql_db_query("intranet",$sql_query);
print"<br><hr>\n";
print " <center>Liste téléphonique triée par <b>site</b> </center>\n";
print"<br><hr><br>\n";
print "<table border=1 table bordercolor=blue width=800 height=20>\n";
print "<TR>\n" ;
print "
<TD width=100>Nom</TD>\n
<TD width=80>Prénom</TD>\n
<TD width=160>Fonction</TD>\n
<TD width=40>Tél</TD>\n
<TD width=80>Site</TD>\n
<TD width=100>Société</TD>\n
<TD width=120>Service</TD>\n
<TD width=200>Mail</TD>\n";
print "</TR>\n";
while($row = mysql_fetch_array($sql_results)){ print "<table border=1 table bordercolor=green width=800 height=20>\n";
print "<TR>\n" ;
print "
<TD width=100>".$row['nom']. "</TD>\n
<TD width=80>".$row['prenom']. "</TD>\n
<TD width=160>".$row['fonction']. "</TD>\n
<TD width=40>".$row['telephone']. "</TD>\n
<TD width=80>".$row['site']. "</TD>\n
<TD width=100>".$row['societe']. "</TD>\n
<TD width=120>".$row['service']. "</TD>\n
<TD width=200>".$row['mail']. "</TD>\n";
print "</TR>\n";
}
mysql_close();
?>
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in c:\program files\easyphp\www\reponsesite.php on line 34