Bonjours;
je veux afficher un tableau mysql dès que je coche sur btn radio et sans clicker sur un bouton
voilà un bout de code que j'ai fait:
<table>
<td align=center ><h5><input type="radio" name="v_livraison_id[]" value="'.$row["livraison_id"].'" ></td>
</tabl>
$nbr_lvrs_id=sizeof($_SESSION['v_livraison_id']);
for ($i=0;$i<$nbr_lvrs_id; $i++)
$ee=$_SESSION['v_livraison_id'][$i];
if (isset($_SESSION['v_livraison_id'][$i])))
{
$req =mysql_query("SELECT *
FROM livraison_clt WHERE
livraison_clt.livraison_id='".$_SESSION['v_livraison_id'][$i]."'");
//-------------------------------------CREATION DE LA TABLE------------------------------------------------
echo'<table border="0" cellspacing="1" cellpadding="1" width="100%">';
echo"<tr align=center bgcolor=#000033>
<th style='COLOR: #EEEEEE;font-size:12px;font-family:tahoma'>Article</th>
<th style='COLOR: #EEEEEE;font-size:12px;font-family:tahoma'>Désignation</th>
<th style='COLOR: #EEEEEE;font-size:12px;font-family:tahoma'>Qte de livraison</th>
<th style='COLOR: #EEEEEE;font-size:12px;font-family:tahoma'>P.U</th>
<th style='COLOR: #EEEEEE;font-size:12px;font-family:tahoma'>Remise</th>
<th style='COLOR: #EEEEEE;font-size:12px;font-family:tahoma'>Mnt.HT</th>
<th style='COLOR: #EEEEEE;font-size:12px;font-family:tahoma'>Mnt.TTC</th>
<th style='COLOR: #EEEEEE;font-size:12px;font-family:tahoma'>Mnt.TVA</th>
<th style='COLOR: #EEEEEE;font-size:12px;font-family:tahoma'>Mnt.Remise</th>
<th style='COLOR: #EEEEEE;font-size:12px;font-family:tahoma'>Qte reliquat</th>
</tr>";
$i=0;
while ($row=mysql_fetch_array($req))
{
if ($i==0)
{
echo "<tr bgcolor=#ddffdd align=left>";
$i++;
}
else
{
echo "<tr bgcolor=#ddffdd align=left>";
$i--;
}
echo '<tr bgcolor=#EEEEEE align=left>
<td style="font-size:12px;font-family:tahoma;font-weight: bold;width:80px">'.$row['code_article'].'</td>
<td style="font-size:12px;font-family:tahoma;font-weight: bold;width:80px">'.$row['designation'].'</td>
<td align=center style="font-size:12px;font-family:tahoma;font-weight: bold;COLOR:#FF0000;width:80px">'.$row['qte_fctr'].'</td>
<td style="font-size:12px;font-family:tahoma;font-weight: bold;width:80px">'.$row['pu_fctr'].'</td>
<td style="font-size:12px;font-family:tahoma;font-weight: bold;width:80px">'.$row['remise_fctr'].'</td>
<td style="font-size:12px;font-family:tahoma;font-weight: bold;width:80px">'.$row['montant_ht'].'</td>
<td style="font-size:12px;font-family:tahoma;font-weight: bold;width:80px">'.$row['montant_ttc'].'</td>
<td style="font-size:12px;font-family:tahoma;font-weight: bold;width:80px">'.$row['montant_tva'].'</td>
<td style="font-size:12px;font-family:tahoma;font-weight: bold;width:80px">'.$row['montant_remise'].'</td>
<td style="font-size:12px;font-family:tahoma;font-weight: bold;width:80px">'.$row['qte_reliquat'].'</td>
</tr>';
}
echo '</table>
';
}
?>
Merci