salut,
je vous demande de l'aide car je n'arrives pas a faire tourner la fonction.
j'ai créé une table medecin avec les champs qu'il faut, et la premiere liste se remplit bien mais quand je cliques sur le premier bouton ça me renvoie l'erreur suivante :
You don't have permission to access /Tests/<br /><b>Notice</b>: Undefined variable: PHP_SELF in <b>c:/program files/easyphp1-8/www/tests/listederoulante.php</b> on line <b>9</b><br /> on this server.
mon code exact (j'ai annulé les 2 mysql_close mais ça y fait rien) :
<table width="750" border="0" height="350" align="center">
<tr>
<td colspan="2" class="titre" height="94">Rechercher</td>
</tr>
<tr>
<td class="principal" width="273" height="99"> Choisissez une Spécialité dans
la liste:
<td class="principal" width="467" height="99">
<form method="post" name="formu" action="<?echo $PHP_SELF;?>">
<?php
mysql_connect("localhost","root","");
mysql_selectdb("test") or die("Connexion impossible");
$requete=mysql_query("select distinct specialite from medecin");?>
<br> <? echo('<select name="specia" >');
echo('<option value="'.'">'.'</option>');
while ($ligne=mysql_fetch_object($requete)){
echo('<option value="'.$ligne->specialite .'">'.$ligne->specialite.'</option>'); }
echo('</select>');
//mysql_close();
?>
<input type="submit" name="bnsubmit" value="Valider" >
</form>
</td>
</tr>
<tr>
<td class="principal" width="273" height="106"> Choisissez un Médecin
dans la liste: </td>
<td class="principal" width="467" height="106">
<form method="post" name="med" action="">
<? $requete1=mysql_query("select * from medecin where specialite='specia'")
?>
<br>
<? echo('<select name="med">');
if($specia==""){
echo('<option value="'.'">'.'Choisissez une spécialité avant'.'</option>');
}
else
{echo('<option value="'.'">'.'</option>');}
while ($ligne1=mysql_fetch_object($requete1)){
echo('<option value="'.$ligne1->nom .'">'.$ligne1->nom.'</option>'); }
echo('</select>');
//mysql_close();
?>
<input type="submit" name="bncherche" value="Chercher">
</form>
</td>
</tr>
</table>