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
|
$pseudo = $_SESSION['pseudo'];
$num_com = $_POST['num_com'];
//echo $pseudo;
echo "<br><br>";
$base=mysql_connect("localhost","root","pouetttt");
mysql_select_db(BASE, $base);
$requetepseudo = "SELECT num_cli from client where pseudo = '".$pseudo."'";
$req = mysql_query ($requetepseudo) or die (mysql_error());
if($req)
{
$datapseudo = mysql_fetch_array($req);
if($datapseudo)
{
$requet = "SELECT a.ref_produit, a.designation_produit, a.quantite, l.etat_livr
FROM acheter a, commande c, livraison l WHERE c.num_com = '".$_POST['num_com']."' AND a.num_cli = '".$datapseudo[0]."' ";
$res = mysql_query($requet);
while($data = mysql_fetch_array($res))
{
echo "<table border='6' cellspacing='5' cellpadding='1' align=center bordercolor = 'black' bgcolor = '#969696' color = 'grey'>";
echo"<tr><td>reference du produit </td><td> ";
echo $data['ref_produit']."</td></tr>";
echo"<br>";
echo"<tr><td>designation du produit </td><td> ";
echo $data['designation_produit']."</td></tr>";
echo"<br>";
echo "<tr><td>quantite </td><td> ";
echo $data['quantite']."</td></tr>";
echo"<br>";
echo"<tr><td>etat de la livraison </td><td>";
echo $data['etat_livr']."</td></tr>";
echo"<br>";
break;
}
}
}
}
?> |
Partager