begin process at 2012 05 28 10:24:12
  Trouver un code source :
 
dans
 
Accueil > Forum > 

PHP

 > 

Divers

 > 

Débutant(e)

 > 

Affichage automatique des valeurs des champs de texte à partir d'un tableau dans la meme page


Derniers messages déposésPoser une question dans le forum ou lancer une discussion

Affichage automatique des valeurs des champs de texte à partir d'un tableau dans la meme page

lundi 22 mars 2010 à 16:39:18 | Affichage automatique des valeurs des champs de texte à partir d'un tableau dans la meme page

nostalgieing

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>&nbsp;</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 }?>
&nbsp;
</table>
<p>&nbsp;</p>
<p><a href="page1.php"><img src="images/precedent.jpg" alt="Quitter" width="70" height="65" border="0" /></a></p>
<p>&nbsp;</p>
</form>
</body>
</html>









Cette discussion est classée dans : texte, champs, affichage, facture, automatique


Répondre à ce message

Sujets en rapport avec ce message

affichage d'une ligne de texte [ par dolu007 ] Je réalise un moteur de recherche et j'aimerai afficher la ligne complète du mot que j'ai trouvercomment faire????? passage à la ligne [ par cas ] Je possède un formulaire, dans lequel j'ai plusieurs champs texte "textearea". Quand j'appuie sur valider, je renseigne un fichier texte avec le conte création automatique table et champs [ par liege ] bonsoir,je cherche un code à insérer dans le fichier de récupération des données de mon formulaire pour qu'il crée automatiquement la table si elle n' remplissage automatique de champs de formulaire [ par drek ] J'aimerais savoir si la chose suivante est possible en php :je clique sur un lien de mon site donnant sur la page d'un autre site qui contient un form affichage de texte et d'image quand on passe sur un lien [ par forngot ] Voila je voudrais savoir si c possible en php que quand on passe sur lien dans une page une petite fenetre apparait est affiche du texte et de l'image enplacement d'objet [ par wishnight ] Bonjourje crée un formulaire où l'on peut remplir à notre guise les champs ou non. Lorsque j'affiche le formulaire de la perosnne X et qu'elle a déja urgent : champs texte [ par chrys76 ] CHRYShelp,Je cherche a recuperer la valeur de mon champs dans une variable. mon champs texte ce nomme txtnb mais il ne veut pas me le prendre: $recup= affichage texte par jour [ par radyonne ] Bonjour,Je voudrais savoir comment faire un script pour pouvoir afficher le programme des émissions, de ma radio, de la journée sur mon site web ???? Avoir le prompt direct dans un champ texte [ par coolboy78 ] Bonjour,voila dans mon site j'ai un champs texte et j'aimerai savoir comment je peux faire pour qu'on ne n'ai pas a cliqué sur ce champs texte pour po afficher valeurs dans des "champs texte"? [ par spritzz ] bonsoir, je souhaite afficher les valeurs d'une ligne de table mysql correspondant à une valeur saisie dans une zone de texte, et, les afficher eux mê


Nos sponsors


Sondage...

Comparez les prix

CalendriCode

Mai 2012
LMMJVSD
 123456
78910111213
14151617181920
21222324252627
28293031   

Consulter la suite du CalendriCode

Photothèque

A découvrir



 
Développement réalisé par Nicolas SOREL (Nix) avec l'aide de : Cyril DURAND et Emmanuel (EBArtSoft), Merci à Vincent pour ses précieux conseils.
CodeS-SourceS.com© Toute reproduction même partielle est interdite sauf accord écrit du Webmaster
CodeS-SourceS.com© est une marque déposée tous droits réservés

Google Coop CodeS-SourceS Google Coop CodeS-SourceS
Temps d'éxécution de la page : 1,622 sec (3)

Nous contacter | Annoncer sur CodeS-SourceS | Mentions légales