Affichage de messages d'erreur sous Windows
bonjour,:)
mon code fonctionne trés bien sous linux avec la distribution debian, mais sous windows il m'indique l'erreur suivante:
Notice: Undefined variable: motclef in c:\program files\easyphp1-8\www\cellule2\consultation.php on line 23
je vous dis que ma page est souvgarder dans le chemin:c:\program files\easyphp1-8\www\cellule2\consultation.php
et voila mon code:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
|
<?php
session_start();
$liendb=mysql_connect("localhost","root","");
mysql_select_db("si_univ");
?>
<form action="consultation1.php" method="post">
<table border="0" width="300" align="center">
<tr>
<td><b>Entrer le matricule:</b></td><td><input type="text" name="motclef"></td><td><input type="submit" name="recherche" value = recherche></td>
</tr>
</table>
</form>
<table width="90%" align="center" border="1">
<tr>
les département de faculté:
<td class="intitule"> le code de département</td>
<td class="intitule">le nom de département</td>
</tr>
<?php
$nom_dep="";
$code_dep="";
$sql="";
$sql="select * from faculte,departement where faculte.nom_fac='$motclef' AND departement.code_fac=faculte.code_fac ";
$resultat = mysql_query($sql);
while ($departement=mysql_fetch_array ($resultat))
{
$code_dep=$departement['code_dep'];
$nom_dep= $departement['nom_dep'];
echo "<tr>";
echo "<td>$code_dep </td>";
echo "<td>$nom_dep </td>";
echo "<td>";
}
echo "</td>";
echo "</tr>";
echo "</table>";
echo "<table border=0 align=right>";
echo "<tr>";
echo "<td>";
echo ' ';echo ' ';echo ' ';echo ' ';
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td>";
echo "</td>";
echo "</tr>";
mysql_close($liendb);
?>
veuillez me dire ou est le probleme, aidez moi. |