Re-salut,
Finalement je vais poster mon bout de code, car j'ai du mal à garder ma variable apres le submit.
Sachant que c'est sur la meme page et que le submit ne fait qu'envoyer la variable selected de mon menu deroulant pour l'exécution de ma deuxieme requete.
<form method="POST" name="toto" action="">
<table border="0">
<tr>
<td width="200" align="right"><p><strong>TOTO:</strong></p></td>
<td align="center" valign="center" rowspan="4">
<?php
$connexion = ocilogon("DB","pwd","user ");
$query = "SELECT toto.name AS toto FROM Ttable";
$stmt = OCIParse($connexion, $query);
OCIExecute($stmt);
echo "<select name='toto' style='width:100px;'>";
While (ocifetch($stmt)) {
echo "<option>".OCIResult ($stmt, "TOTO")." \n";
}
echo "</select>";
OCILogOff($connexion);
?>
</td><td><br><input type="submit" value="Envoyer">
</form></td>
<td width="200" align="right"><p><strong>TITI:</strong></p></td>
<td>
<?php
if (isset($_POST['toto'])){
$nom_toto = $_POST['toto'];
$connexion = ocilogon("DB","pwd","user ");
$query = "SELECT titi.name AS TITI FROM Ttable
WHERE toto.name = '$nom_toto'";
$stmt = OCIParse($connexion, $query);
OCIExecute($stmt);
if(!empty($nom_toto)){
//ok pas vide
echo "<select style='width:100px;'>";
While (ocifetch($stmt)) {
echo "<option>".OCIResult ($stmt, "titi")." <br>\n";
}
echo "</select>";
OCILogOff($connexion);
}
}
?>
</td>
</table>
Je veux bien test, le JS, parce que je crois que ca marche surper bien, mais je ne sais comment le faire. Thanx for your help
Skito