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
|
$requete = "select nom, prenom, email, telephone, user_mobile, poste_interne, division
from hd_utilisateur,hd_division where hd_utilisateur.fk_division= hd_division.id_division";
if (!$requete) die(mysql_error());
$result = mysql_query($requete, $BD);
if (!$result) die(mysql_error());
//$rows = mysql_fetch_array($result);
echo"<table class=\"adminlist\" border=\"0\" align=\"center\">";
echo "<tr>
<th class=\"title\"><input type=\"checkbox\" name=\"cid[]\" value=\"",$rows['id_user'],"\" /></th>
<th class=\"title\">Nom</th>
<th class=\"title\">Prenom</th>
<th class=\"title\" >E-mail</th>
<th class=\"title\">Telephone</th>
<th class=\"title\" >portable</th>
<th class=\"title\">Poste interne</th>
<th class=\"title\">Division</th>";
echo "</tr>\n";
for($i=0;$i<mysql_num_rows($result);$i++)
{
mysql_data_seek($result,$i);
$champs=mysql_fetch_array($result);
echo "<tr align=\"center\">";
for($j=0;$j<7;$j++) // 7 = nombre de champs figurant dans le select
{
if($j==0)
//echo "<td width = \"70\"><input type=\"checkbox\" name=\"removeid[]\" value=\"",$row['id'],"\" /></td>";
echo '<td><input type="checkbox" name="cid[]" value="'.$champs[0].'"></td>';
echo '<td> '.$champs[$j].' </td>';
}
echo "</tr>";
}
echo "</table>"; |
Partager