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 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
| <html>
<head>
</head>
<form action="" method="post" name="form1">
<table frame="box" rules="none">
<tr>
<td>resultat de choix</td>
</tr>
<tr>
<td>
<?php
$local=$_POST['local'];
$choix=$_POST['choix'];
$TableauRef=explode(",",$choix);
$Nb=count($TableauRef);
$serveur="localhost";
$user="user1";
$pwd="user1";
$db="glpi";
$lien=mysql_connect($serveur,$user,$pwd) or die("impossible de connecter de serveur");
mysql_select_db($db,$lien);
$query="select *from article where local='$local'";
$res=mysql_query($query);
while($ligne=mysql_fetch_row($res))
{
for($i=0;$i<$Nb;$i++){
if($TableauRef[$i]==$ligne[0])
echo"<tr><td>$TableauRef[$i]</td><td>correcte</td></tr>";
}
}
?>
</td>
</tr>
</table>
<table frame="box" rules="none">
<tr>
<td>resultat de deuximme choix</td>
</tr>
<tr>
<td>
<?php
$local2=$_POST['local'];
$choix2=$_POST['choix'];
$TableauRef2=explode(",",$choix2);
$Nb2=count($TableauRef2);
$serveur="localhost";
$user="user1";
$pwd="user1";
$db="gestionpret";
$lien=mysql_connect($serveur,$user,$pwd) or die("impossible de connecter de serveur");
mysql_select_db($db,$lien);
$query2="select *from article where local='$local2'";
$res2=mysql_query($query2);
while($ligne2=mysql_fetch_row($res2))
{
for($j=0;$j<$Nb2;$j++){
if($TableauRef2[$j]!=$ligne2[0])
echo"<tr><td>$TableauRef2[$j]</td><td>faux</td></tr>";
}
}
?>
</td>
</tr>
</table>
</form>
</body>
</html> |