erreur code
Posté : 23 avr. 2011, 11:14
bonjour a tous
SLT DSL J AI UN PROBLEME DE SYNTAXE PHP VOICI MON CODE
SLT DSL J AI UN PROBLEME DE SYNTAXE PHP VOICI MON CODE
<?php
$CIN=$_POST['CIN'];
echo "$CIN";
if(isset($_REQUEST['CIN'])&&!empty($_REQUEST['CIN']))
$CIN=$_REQUEST['CIN'];
else die("<p>CIN non défini</p>");
if(!is_numeric($CIN))
die("<p>Veuillez saisir votre CIN numérique</p>");
include("file:///D|/pfe/fonctions.php");
connexion();
$requete="SELECT * FROM étudiant WHERE CIN=".$_POST[CIN];
$resultat=mysql_query($requete)or die("<p>Impossible d'effectuer la requete!".mysql_error()."</p>");
$enregistrement=mysql_fetch_Object($resultat);
if (mysql_num_rows($resultat)==0)
echo "<p>Enregistrement non existant</p>";
else{
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Demande d'un foyer</title>
</head>
<body bgcolor="#FFFFFF" text="#0033CC" link="#FFFFFF">
<center> <h1> </h1>
<h1><b><font color="#CC0099" face="Times New Roman, Times, serif">Demande de foyer:</font></b></h1>
<form method="POST" action="demandefoyer.php" name="form">
<table width="46%" height="416" border="0" align="center" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td width="33%" height="40"> <font size="5"> <strong>CIN :</strong></font></td>
<td><font color="#000000">
<?php echo $enregistrement['CIN']; ?>
</font></td>
</tr>
<tr>
<td height="40"> <font size="5"> <strong>Nom :</strong></font></td>
<td><font color="#000000">
<?php echo $enregistrement['nom']; ?>
</font></td>
</tr>
<tr>
<td height="40"> <font size="5"> <strong>Prénom :</strong></font></td>
<td><font color="#000000">
<?php echo $enregistrement['prenom']; ?>
</font></td>
</tr>
<tr>
<td height="40"><font size="5"><strong>Sexe :</strong></font></td>
<td><font color="#000000">
<?php echo $enregistrement['sexe']; ?>
</font></td>
</tr>
<tr>
<td height="40"> <font size="5"> <strong>Avenue/rue :</strong></font></td>
<td><font color="#000000">
<?php echo $enregistrement['rue']; ?>
</font></td>
</tr>
<tr>
<td height="40"> <font size="5"> <strong>Ville :</strong></font></td>
<td><font color="#000000">
<?php echo $enregistrement['ville']; ?>
</font></td>
</tr>
<tr>
<td height="40"> <font size="5"> <strong>Code postale :</strong></font></td>
<td><font color="#000000">
<?php echo $enregistrement['code_postal']; ?>
</font></td>
</tr>
<tr>
<td height="40"> <font size="5"> <strong>Niveau d'étude :</strong></font></td>
<td><font color="#000000">
<?php echo $enregistrement['niveau_d\'etude']; ?>
</font></td>
</tr>
<tr>
<td height="40"> <font size="5"> <strong>Etablissement universitaire :</strong></font></td><td width="67%" height="30">
<font color="#000000">
<?php echo $enregistrement['nom_etab']; ?>
</font></td> </tr>
<?php
$rqt="SELECT Liste_foyers FROM établissement universitaire E , foyer F where E.code_etab=F.code_etab";
$rst=mysql_query($rqt) or die('erreur dans la requete');
?>
<tr>
<td height="40"> <font size="5"> <strong>Liste des foyers :</strong></font></td>
<?php
while($enregistrement=mysql_fetch_array($rst))
{
?>
<td><?php echo $enregistrement['Liste des foyers les plus proches'] ?></td></tr>
<?php } ?>
</table><br>
<input onclick="valider(this.form)" type="button" name="envois" value="envoyer" ></form>
</center>
<?php }
deconnexion();
?>
</body>
</html>