salut!
je suis entrain de faire un site de location de voiture.
mais ilya un probléme dont le passage de la valeur d'une zone de text d'un formulaire<input type='text' name='depart' id='depart'>
je souhaite que la valeur saisi dans cette page
acceuil.php doit étre récuperer vers la page
affichagevoiture.php
Voici le code de formulaire de la page acceuil.php::
<form method="get" name="formulaire1" action="affichagevoiture.php" >
<table width="300" border="0">
<tr>
<td width="53" height="30"><div align="right"><span class="Style17"><strong><font size="3">Ville:</font></strong></span></div></td>
<td width="237">
<?php
$serveur="127.0.0.1";
$bd="locationdesvoitures";
$login="root";
$motdepasse="mysql";
$conn=mysql_pconnect($serveur,$login,$motdepasse) or trigger_error(mysql_error(),E_USER_ERROR);
$bd=mysql_select_db($bd,$conn);
$result = mysql_query( "SELECT distinct ville_dep FROM voitures");
echo "<select name='ville_dep'>";
while ($tab = mysql_fetch_array($result))
{
echo "<option value ='$tab[0]'>".$tab[0];
echo"</option>";
}
echo"</select>";
mysql_close();
?> </td>
</tr>
<tr>
<td height="33"><div align="right"><span class="Style17"><strong><font size="3">Retour:</font></strong></span></div></td>
<td><?php
$serveur="127.0.0.1";
$bd="locationdesvoitures";
$login="root";
$motdepasse="mysql";
$conn=mysql_pconnect($serveur,$login,$motdepasse) or trigger_error(mysql_error(),E_USER_ERROR);
$bd=mysql_select_db($bd,$conn);
$result = mysql_query( "SELECT distinct ville_retour FROM voitures");
echo "<select name='ville_retour'>";
while ($tab = mysql_fetch_array($result))
{
echo "<option value ='$tab[0]'>".$tab[0];
echo"</option>";
}
echo"</select>";
mysql_close();
?> </td>
</tr>
<tr>
<td height="37"><div align="right"><span class="Style17"><strong><font size="3">Du:</font></strong></span></div></td>
<td><input name="depart" type="text" class="Stylesab" id="depart" ><img src="images/date.gif" width="24" height="24"title="Calendrier"></td>
</tr>
<tr>
<td height="38"><div align="right"><span class="Style17"><strong><font size="3">Au:</font></strong></span></div></td>
<td><input name="ret" type="text" class="Stylesab" id="ret" ><img src="images/date.gif" width="24" height="24"title="Calendrier" ></td>
</tr>
<tr>
<td height="40"> </td>
<td valign="left"><!--<a href="affichagevoiture.php?du='"$_POST['ret'] "'" style="text-decoration: none">-->
<input type="submit" name="Suivant" value="Suivant"><!--</a>-->
</td>
</tr>
</table>
</form>
et merci d'avance.