{source}
<?php
$db = mysqli_connect(« localhost », »wilayao31_gu », »GuichetU_!#2021″, »wilayao31_gu« );
if(!$db){
die(« Connection failed: » . mysqli_connect_error());
}
?>
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<form method= »POST »>
<br>
<input class= »form-control » type= »text » id= »nom » name= »nom » placeholder= »اللقب » dir= »auto »class= »effect-2″ tabindex= »1″>
<br>
<input class= »form-control » type= »text » id= »ndos » name= »ndos » placeholder= »رقم المستخدم » dir= »auto »class= »effect-2″ tabindex= »1″>
<br>
<input type= »submit » name= »submit » value= »عرض »>
<br><br>
</form>
<?php
mysqli_set_charset($db, »utf8″);
if(isset($_POST[‘submit’])){
$nom=$_POST[‘nom‘];
$ndos=$_POST[‘ndos‘];
$recordss = mysqli_query($db, »select * from guichet where nom=’$nom‘ and nin=’$ndos‘ « );
if (mysqli_num_rows($recordss) == 0) {
echo ‘<p style= »font-size:24px;color:red »>Veuillez vérifier votre nom et identifiant<br/></p>’;
}
else
{
$datas = mysqli_fetch_assoc($recordss);
$num=$datas[‘num’];
$commune=$datas[‘commune’];
$nom=$datas[‘nom’];
$prenom=$datas[‘prenom‘];
$avis=$datas[‘avis‘];
$type=$datas[‘type‘];
echo ‘<p style= »font-size:24px;color:black »>Commune de: ‘.$commune.’.<br/></p>’;
echo ‘<p style= »font-size:24px;color:black »>Numero de Dossier: ‘.$num.’.<br/></p>’;
echo ‘<p style= »font-size:24px;color:black »>Nom: ‘.$nom.’.<br/></p>’;
echo ‘<p style= »font-size:24px;color:black »>Prénom: ‘.$prenom.’.<br/></p>’;
echo ‘<p style= »font-size:24px;color:black »>Type de demande: ‘.$type.’.<br/></p>’;
if ($avis==’Favorable’){
echo ‘<p style= »font-size:24px;color:green »>Situation du dossier: ‘.$avis.’.<br/></p>’;
}
elseif ($avis==’Défavorable’){
echo ‘<p style= »font-size:24px;color:red »>Situation du dossier: ‘.$avis.’.<br/></p>’;
}
elseif ($avis==’Reporté’){
echo ‘<p style= »font-size:24px;color:blue »>Situation du dossier: ‘.$avis.’.<br/></p>’;
}
elseif ($avis==’Transfert au GU’){
echo ‘<p style= »font-size:24px;color:black »>Situation du dossier: ‘.$avis.’.<br/></p>’;
}
elseif ($avis==’En cours de traitement‘){
echo ‘<p style= »font-size:24px;color:blue »>Situation du dossier: ‘.$avis.’.<br/></p>’;
}
}
}
?>
<?php
mysqli_close($db);
?>
</body>
</html>
{/source}