Salut à tous
je suis débutante en php et j'ai un probleme d'implémentation :je fais une recherche dans un tableau et je veux afficher les champs de ce table dans des zones de texte j'ai reussi dans la recherche (j'ai trouvé l'element que je cherche)mais j'ai à l'affichage automatique des champs je cherche de l'aide si quelqu'un de vous peut m'aider et merci d'avance
Ci-joint le code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1256" />
<title>Document sans titre</title>
<style type="text/css">
<!--
.Style1 {
color: #000066;
font-weight: bold;
}
.Style3 {
font-family: Cambria;
font-weight: bold;
font-size: xx-large;
}
.Style4 {
font-size: medium;
font-weight: bold;
font-family: Cambria;
}
.Style5 {font-size: medium}
.Style6 {font-weight: bold; color: #000000;}
.Style7 {font-family: Cambria}
.Style8 {font-size: medium; font-family: Cambria; }
.Style9 {font-family: Cambria; font-weight: bold; font-size: x-large; }
-->
</style>
</head>
<body>
<table width="1555" border="0">
<tr>
<td width="130"><?php
$date = date("d-m-Y");
Print($date);?></td>
<td width="1415"><div align="right"><a href="index.php"><img src="images/quitter.jpg" alt="Déconnection" width="55" height="61" border="0" /></a></div></td>
</tr>
</table>
<p> </p>
<form id="form1" name="form1" method="post" action="">
<p align="center"> <table width="1290" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#CCE6FF" >
<tr rowspan="4" bgcolor="#CCE6E6" align="center">
<td height="53" colspan="4" > <div align="center" class="Style1">
<div align="center" class="Style3">
<div align="center" class="Style3">
<div align="center">Facture Avoir</div>
</div>
</div></td>
</tr>
<tr bgcolor="#CCE6E6" " ><td colspan="4" nowrap="nowrap" bgcolor="#CCE6FF" align="center"><div align="center"></div></td>
</tr>
<td nowrap="nowrap" bordercolor="#BFE2E8" bgcolor="#CCE6FF"><div align="center" class="Style4">
<div align="center"></div>
</div></td>
<td bordercolor="#BFE2E8" bgcolor="#CCE6FF"> <blockquote>
<blockquote>
<blockquote>
<blockquote>
<blockquote>
<blockquote>
<blockquote>
<blockquote>
<p>
Client :
<input name="nom_client_rech" type="text" id="nom_client_rech" size="16" />
<span class="Style8">
<input type="submit" name="Submit" value="Rechercher" />
</span> </p>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
<div align="center" class="Style8"></div>
<span class="Style8">
</label>
</span></td>
<td bgcolor="#CCE6FF"><div align="center"><span class="Style5"><span class="Style5"><span class="Style7"></span></span></span></div></td>
</tr>
</table>
<table align="center">
<?php
$nom=$_GET['nom_client'];
include("connexion.php");
$req=mysql_query("select * from facture_avoir where nom_client='".$nom."'");
$row=mysql_fetch_object($req);
?>
<tr>
<td nowrap="nowrap"><span class="Style11">N° Facture:</span></td>
<td colspan="5"><input name="num_facture" type="text" id="num_facture" value="<?php echo $row->num_facture; ?>" size="50"/></td>
</tr>
<tr>
<td nowrap="nowrap"><span class="Style11">N° Facture Avoir:</span></td>
<td colspan="5"><input name="num_facture_avoir" type="text" id="num_facture_avoir" value="<?php echo $row->num_facture_avoir; ?>" size="50"/></td>
</tr>
<tr>
<td nowrap="nowrap"><span class="Style11">T.V.A:</span></td>
<td colspan="5"><input name="tva_facture_avoir" disabled="disabled" type="text" id="tva_facture_avoir" value="<?php echo $row->tva_facture_avoir; ?>" size="50"/></td>
</tr>
<tr>
<td nowrap="nowrap"><span class="Style11">Tot.TTC:</span></td>
<td colspan="5"><input name="tot_ttc_avoir" type="text" id="tot_ttc_avoir" value="0.000" size="50"/></td>
</tr>
<tr>
<td nowrap="nowrap"><span class="Style11">TTC:</span></td>
<td colspan="5"><input name="ttc_avoir" disabled="disabled" type="text" id="ttc_avoir" value="0.000" size="50"/></td>
</tr>
<tr>
<td nowrap="nowrap"><span class="Style11">Timbre:</span>
<input name="timbre" type="radio" checked="checked" value="0.000" /></td>
<td><input name="timbre" type="text" disabled="disabled" id="timbre" value="0.000" size="50"/></td>
</tr>
</table>
</p>
<table align="center">
<tr bgcolor="#CCE6E6">
<td ><span class="Style7">COCH</span></td>
<td ><span class="Style7">N°</span></td>
<td><span class="Style7">N° Facture Avoir</span></td>
<td nowrap="nowrap"><span class="Style7">Client</span></td>
<td nowrap="nowrap" bgcolor="#CCE6E6"> Société </td>
<td><span class="Style7">cmb TVA</span></td>
<td nowrap="nowrap"><span class="Style7">Montant</span></td>
<td nowrap="nowrap" bgcolor="#CCE6E6"> Date d'Ajout</td>
<td nowrap="nowrap" bgcolor="#CCE6E6"> Dernière Modification</td>
</tr>
<?php include("connexion.php");
$i=0;
import_request_variables('gp');
$req=mysql_query("select * from facture_avoir where nom_client like'".$nom_client_rech."%' ORDER BY `nom_client` DESC ")or die (mysql_error());
while($row=mysql_fetch_object($req))
{ $i++;
if(($i % 2)==1)
{$col='#CCE6FF';
} else $col='#CCE6E6';
?>
<tr bgcolor=<?php echo $col; ?>>
<td><span class="Style14 Style7"></span></td>
<td><span class="Style14 Style7"><?php echo $i;?></span></td>
<td><span class="Style14 Style7"><?php echo $row->num_facture_avoir; ?></span></td>
<td><span class="Style14 Style7"><?php echo $row->nom_client; ?></span></td>
<td><span class="Style14 Style7"><?php echo $row-> nom_societe; ?></span></td>
<td><span class="Style14 Style7"><?php echo $row->cmb_tva; ?></span></td>
<td><span class="Style14 Style7"><?php echo $row->montant_facture_avoir; ?></span></td>
<td nowrap="nowrap" bgcolor="<?php echo $col; ?>"><span class="Style14"><?php echo $row->date_ajout; ?></span></td>
<td nowrap="nowrap" bgcolor="<?php echo $col; ?>"><span class="Style14"><?php echo $row->date_modif; ?></span></td>
</tr>
<?php }?>
</table>
<p> </p>
<p><a href="page1.php"><img src="images/precedent.jpg" alt="Quitter" width="70" height="65" border="0" /></a></p>
<p> </p>
</form>
</body>
</html>