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
| <html>
<h2><b><u><center>CHOISISSEZ UN CLIENT</center></u></b></h2></br>
<FORM action="visualiserclient.php" name="f1" method="post">
</html>
<b>Département:</b><input type="text" name="txtdep" value="" size="10" maxlength="5"><input type="submit" name="recherche" value="Rechercher"></br>
<?
@$dep=$_POST["txtdep"]; // récuperation du département choisi dans la variable $dep
echo '<table><tr>';
echo '<td><b>Clients</b></td>';
echo '<td><select name ="cboPerso" size="1">';
$cnx=mysql_connect("localhost","root","")or die("connexion impossible");
mysql_select_db("testbdlocale",$cnx)or die("base non trouvée");
$req="SELECT ref,nom FROM clients WHERE order by nom";
$res=mysql_query($req,$cnx);
$JeuEnr=mysql_fetch_assoc($res);
echo"<option value= \"$ref\">".'tous les clients'.'</option>';
while($JeuEnr)
{
$ref=$JeuEnr["ref"];
$nom=$JeuEnr["nom"];
echo"<option value=\"$ref\">".$nom.'</option>';
$JeuEnr=mysql_fetch_assoc($res);
}
?><html><input type="submit" name="btenvoi" value="OK"></html><?
echo'</select>';
echo '</td>';
@$client=$_POST["cboPerso"]; // récuperation du client choisi dans la variable $client
echo $client;
mysql_close($cnx);
?>
<html>
</form>
</html> |
Partager