Bonjour,
je vous dit merci pour tous parce depuis j'ai connu cette plateforme je commence a m'ameliorer en php mais j'ai un grand soucis pour ma page affiche_client.php s'il vous plait j'ai besion d'aide.
merci d'avance
page affiche_client.php
<!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>
<link rel="stylesheet" type="text/css" href="../styles/style_menu.css" />
<link rel="stylesheet" type="text/css" href="../styles/ora_style.css" />
<script language="javascript">
</script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ORANGE TM - </title>
</head>
<body>
<?php
include("entete.php");include("Menu.php");include("corps.php");include("connexion.php");
$numcni=$_GET['num'];
$req=$cnx->prepare('select * from client where numcni=:num');
$req->execute(array('num'=>$numcni));
$res=$req->fetch();
echo '
<center><div id="conteneur"><span class="titreconteneur"> INFOS SUR LE CLIENT</span>
<hr color="#FFFFFF" />
<table border="0" cellpadding="5" cellspacing="10" width="100%" rules="rows">
<tr><td width="15%">Nom</td> <td class="td">'.$res['1'].'</td><td rowspan="9" width="20%"> </td></tr>
<tr><td width="40%">Prénoms</td> <td class="td">'.$res['2'].'</td></tr>
<tr><td width="20%">Domicile</td> <td class="td">'.$res['3'].'</td></tr>
<tr><td width="10%">Boite Postale</td> <td class="td">'.$res['4'].'</td></tr>
<tr><td width="10%">Email</td> <td class="td">'.$res['5'].'</td></tr>
<tr><td width="15%">Profession</td> <td class="td">'.$res['6'].'</td></tr>
<tr><td width="15%">Sexe</td> <td class="td">'.$res['7'].'</td></tr>
<tr><td width="30%">Type de Client</td> <td class="td">'.$res['8'].'</td></tr>
<tr><td width="30%"></td> <td class="td"></td></tr>
</table>';
echo'<img src="upload/'.$res['9'].'" class="foto2" />';
$n= $res['0'];
echo'<form method="post" action="">
<input type="hidden" name="t" value="<?php echo $res['.'numcni'.'];?>"/>
<input type="button" value="Retour" name="retour" class="bouton" onclick="window.history.back();">
<input type="submit" value="Modifier" name="modifier" class="bouton"> ';
echo '</DIV>';
?>
<table border="0" cellpadding="5" cellspacing="10" rules="rows" style="width:57%; color:#FFF;
background-color: #999;border-color:#000 solid 2px;border-radius:0 0 15px 15px; position:absolute; top:85%; left:22%">
<tr> <th colspan="2">LISTE DES NUMEROS DU CLIENT ET LEUR ETAT D'IDENTIFICATION</th></tr>
<tr bgcolor="#0000CC"> <th>Numéro sim</th><th>Identification</th></tr>
<?php
$sql=$cnx->prepare("select numsim, ident from sim where numcni=:num");
$sql->execute(array("num"=>$numcni));
while($result=$sql->fetch())
{
echo' <tr><td align="center">'.$result[0].'</td><td align="center">'.$result[1].'</td></tr>';
}
echo'</table>';
?>
<input type="submit" value="Modifier" name="modifier" class="bouton"> </form>
<?php
// code qui appelle le formulaire de modification
if(isset($_POST['modifier']))
{
echo $_POST['t'];
header('location:modifClient.php?num='.$_POST['t'].'');
}
// code de suppression
if(isset($_POST['supprimer']))
{
$n= $_POST['t'];
$req=$cnx->prepare('delete from client where codeCli=:num');
echo'<script language="javascript">
function confirme( identifiant )
{
var confirmation = confirm( "Voulez vous vraiment supprimer cet enregistrement ?" ) ;
if( confirmation )
{
'.$req->execute(array('num'=>$n)) or die(print_r($req->errorInfo()));'.
}
}
</script>';
echo'<SPAN STYLE="color:red; font-size:20px; top:600px; left:600px; ; position:absolute;
text-decoration:blink;">Suppression effectuee avec succes</span>';
sleep(2);
header('location:rechClient.php');
}
?>
<?php include('pied.php');?>
</body>
</html>
page rech_client.php
<!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>
<link rel="stylesheet" type="text/css" href="../styles/style_menu.css" />
<link rel="stylesheet" type="text/css" href="../styles/ora_style.css" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ORANGE TM - Recherche de client</title>
</head>
<body>
<?php
include("entete.php");include("Menu.php");include("corps.php");include("connexion.php");include("fonction.php")
?>
<br /><br />
<center>
<div id="conteneur">
<span class="titreconteneur"> RECHERCHE DE CLIENT</span>
<hr color="#FFFFFF" /><br />
<form method="post">
<input type="text" name="numcni" class="saisie" placeholder="Entrer le Numero CNI du client" autofocus="autofocus" autocomplete="off"><br /><br />
<input type="submit" value="OK" name="ok" class="bouton" />
<input type="reset" value="Annuler" class="bouton" />
</form>
</div>
</center>
<?php
if(isset($_POST['numcni']))
{
$numcni=htmlspecialchars($_POST['numcni']);
if(!empty($numcni))
{
$req=$cnx->prepare("select * from client where numcni=:num");
$req->execute(array('num'=>$numcni));
$res=$req->fetch();
if($res)
{
header("location:affiche_client.php?num=".$numcni."");
}
else
{
echo'<script>alert("Numero de client incorrect!!!!!!!")</script>';
exit();
}
}
else
{
echo'<script>alert("Numero de client non renseigné!")</script>';
exit();
}
}
?>
</body>
</html>
EDIT : Correction des balises de code
Afficher la suite