bonjour
je suis debutante en php et j'ai un probleme dans l'implementation d'une page web :je veux extraire des données d'une pages web à partir d'un bouton de type image et les transferer à une deuxieme page mais j'ai pas pu trouvé une methode j'ai fais le code des deux pages avec une image dont je fais le lien pour l'extraction mais ça ne marche pas
SVP j'ai besoin de vos aide cest uuuuuuuregent:'(((
Le code de la premiere page ou je veux apporter les données est le suivant:
<form id="form1" name="form1" method="post" action="insertion_affecter_frais_vehicule.php">
<p></p>
<div align="center">
<fieldset style="width:600px;" >
<table align="center">
<tr>
<?php
$id=$_GET['id'];
include("connexion.php");
$req=mysql_query("select * from carte_gasoil where id='".$id."'");
$row=mysql_fetch_object($req);
?>
<td height="46"> <span class="Style14">N° Bon</span></td>
<td> <input type="text" name="num_bon_carte" id="num_bon_carte" /></td>
<td nowrap="nowrap"><p><span class="Style14">Carte</span></p></td>
<td><input type="text" name="num_carte"size="30" value="<?php echo $_POST['num_carte']; ?>"/></td>
<td><a href="liste_carte_gasoil.php?" class="Style7"><img src="images/download.bmp" alt="Afficher" width="28" height="29" /></a></td>
</tr>
</table ></fieldset></div>
<p></p>
<div align="center">
<fieldset style="width:600px;" >
<table align="center" height="200">
<tr >
<td><p><span class="Style7">Matricule</span></p></td><td><input type="text" name="matricule_carte" size="20"value="<?php echo $_POST['matricule_vehicule']; ?>"/></td>
<td> </td>
<td><p><span class="Style7">Quantité</span></p></td><td><input type="text" name="quantite"size="20" /></td>
</tr>
<tr>
<td nowrap="nowrap"><p><span class="Style7">Nom & Pré Chauffeur</span></p></td><td><input type="text" name="nom_prenom_chauffeur"size="20" /></td>
<td><a href="liste_chauffeur.php?" class="Style7"><img src="images/download.bmp" alt="Afficher" width="28" height="29" /></a></td>
<td><p><span class="Style7">PU</span></p></td><td><input type="text" name="pu" size="20"/></td>
</tr>
<tr >
<td><p><span class="Style7">Pays</span></p></td><td><input type="text" name="pays" size="20"/></td>
<td> </td>
<td><p><span class="Style7">HT</span></p></td> <td><input type="text" name="ht"size="20" /></td>
</tr>
<tr>
<td><p><span class="Style7">Lieu</span></p></td><td><input type="text" name="lieu"size="20" /></td>
<td> </td>
<td><p><span class="Style7">TVA</span></p></td><td><input type="text" name="tva" size="20"/></td>
</tr>
<tr>
<td><p><span class="Style7">KM</span></p></td><td><input type="text" name="km" size="20"/></td>
<td> </td>
<td><p><span class="Style7">TTC</span></p></td><td><input type="text" name="ttc" size="20"/></td>
</tr>
<tr>
<td><p><span class="Style7">Produit</span></p></td><td><input type="text" name="produit" size="20"/></td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
</fieldset>
<table align="center">
<tr>
<td> <input type="submit" name="Submit2" value="Quitter" onclick="page1.php" /></td>
<td nowrap="nowrap"><div align="right" class="Style7">
<input type="submit" name="Submit" value="Ajouter" />
</div></td>
<td width="67" nowrap="nowrap"><input name="Submit2" type="reset" onclick="window.history.go(-1)" value="Retour" /></td>
</p>
</td></tr></table>
</form>
Le code de la 2eme page ou je veux extraire les données est le suivant:
<table align="center">
<tr>
<td nowrap="nowrap"align="center"><a><span class="Style11">Carte</span></a></td>
<td><input name="num_carte_rech" type="text" id="num_carte_rech" value="<?php echo $row->num_carte; ?>" size="30"/></td>
<td><input type="submit" name="Submit" value="Rechercher" /></td>
</tr>
</table>
<label>
</label>
<table align="center">
<tr bgcolor="#CCE6E6">
<th ><span class="Style7">ID</span></th>
<th ><span class="Style7">Matricule</span></th>
<th ><span class="Style7">N° Carte</span></th>
</tr>
<p> </p>
<?php include("connexion.php");
$i=0;
import_request_variables(gp);
$req=mysql_query("select * from carte_gasoil where num_carte like'".$num_carte_rech."%' ORDER BY 'num_carte' 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><input type="text" name="id_frais" value="<?php echo $i;?>"</td>
<td><input type="text" name="matricule_carte" value="<?php echo $row-> matricule_carte; ?>" /></td>
<td><input name="num_carte" type="text" id="num_carte" value="<?php echo $row-> num_carte; ?>" /></td>
<td bgcolor="<?php echo $col; ?>"> <p class="Style7"><a href="bon_remplir_gasoil_par_carte.php?id=<?php echo $row->id; ?>"><img src="images/upload.bmp" alt="Modifier" width="51" height="51" border="0" /></a></p></td>
</tr>
<?php
}
?>
</table>
<p> </p>
<p> </p>
<div align="right">
<fieldset style="width:200px;" >
<table align="center">
<tr>
<td><input type="submit" name="Submit2" value="Quitter" /></td>
<td><input type="submit" name="Submit22" value="Supprimer" /></td>
<td><input type="submit" name="Submit22" value="ok" /></td>
</tr></table></fieldset> </div>
<p> </p>
<p><a href="page1.php"><img src="images/precedent.jpg" alt="Quitter" width="70" height="65" border="0" /></a></p>