il m'affiche rien lorsque je clic sur le lien de mon aperçu incident.Quel lien ?
?php. mais lorsque je clic sur mon lien appercuinc.php il m'affiche : Objet non trouvé!
require('gestinc/connexion.php');
$etat="active";
@$id=$_GET['Id'];
// echo "$id et $table";
// $link=mysql_connect("$host","$user","$password") or die('<font color=red>Erreur de connnection</font><br> '.mysql_error() );
//mysql_select_db("$bd") or die('<font color=red>Base inexistante</font><br> '.mysql_error() );
$select_actu = "SELECT id,numero,statut, date_format(debut_prevu, '%d/%m/%Y') AS debut_prevu,date_format(traite,'%d/%m/%Y') AS traite,utilisateur,contact,sujet,materiel,priorite,date_format(fin,'%d/%m/%Y') AS fin,details_mat,description,commentaire,localisation,etat,incident_pere FROM incident WHERE (etat='$etat' && id='$id') ";
$requete = mysql_query($select_actu) or die( "ERREUR MYSQL numéro: ".mysql_errno()."<br>Type de cette erreur: ".mysql_error()."<br>\n" );
while($result=mysql_fetch_array($requete) )
{
//$dest="imagesfid/";
//$date="$result[date]";
//$an=substr($date,0,4);
//$mois=substr($date,5,2);
//$jour=substr($date,8,2);
//$date="Publié le<br>$jour-$mois-$an";
//$auteur="Source:<br>$result[auteur]";
?>
<style type="text/css">
<!--
.Style2 {font-size: xx-large}
-->
</style>
<table width=967 border=0 align=center cellspacing=2 bgcolor=#FFFFFF>
<tr>
<td width=232 height=83><div align=center><img src="images/fsdplogo.jpg" title="Logo du FSDP" alt="Fonds de Soutien et de Developpement de la Presse" width="239" height="80" /></div></td>
<td width=312> </td>
<td width=260><div align="center"><strong>DIRECTION EXECUTIVE<br />
-- -- -- -- -- -- -- -- -- -- -- -- <br />
SERVICE COMMUNICATION ET DOCUMENTATION
</strong></div></td>
</tr>
<tr>
<td><?php
//<table width=957 border=0 align=center class=adminheading>
//<tbody>
//<tr>
//<th width=957 class=cpanel>
//<p align=center style=background:#FFFFFF><strong>APPERCU DE L'Incident : &N° <font color="#FF0000"><?php $num_inc=($result['numero']); echo"$num_inc; </font> </strong> </p></th>
//</tr>
//</tbody>
//</table>
?></td>
<td bgcolor="#F3F0BA"><div align=center><strong>
<?php //$date=date('d-m-Y'); echo"$date"; ?>
FICHE DE L'INCIDENT N° <font color=blue><?php $num_inc=($result['numero']); echo"$num_inc"; ?></font></strong><br />
</strong><br />
</div></td>
<td> </td>
</tr>
</table>
<!-- Debut du deuxieme -->
<table class="adminform" align="center" width="">
<tbody>
<tr>
<td valign="top">
<div align="center">
<div align="center">
<table cellpadding="0" cellspacing="0" border="0" align="center">
<tr>
<td><table bgcolor="#C7D6F1" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><div align="center">
<table width="957" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td width="5%"> </td>
<td width="16%"> </td>
<td width="1%"> </td>
<td colspan="4"> </td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
<td><div align="right"><strong>Code incident</strong> :</div></td>
<td> </td>
<td> <?php $num_inc=($result['numero']); echo"<strong>$num_inc</strong>"; ?></td>
<td> </td>
<td> </td>
<td width="7%" rowspan="8"><p align='center'><br />
<?php //$immg=($result['img_fid']); echo"<img src=$dest$immg border=0 vspace=0 hspace=0 width=135 height=145 />"; ?>
</p></td>
</tr>
<tr>
<td> </td>
<td><div align="right"><strong>Libéllé Incident</strong> :</div></td>
<td> </td>
<td> <?php $nom_inc=($result['incident_pere']); echo"$nom_inc"; ?></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td height="20"> </td>
<td><div align="right"><strong>Date Incident</strong>:</div></td>
<td> </td>
<td> <?php $date_inc=($result['debut_prevu']); echo"$date_inc"; ?></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td><div align="right"><strong>Debut Traitement</strong> :</div></td>
<td> </td>
<td> <?php $date_trai=($result['traite']); echo"$date_trai"; ?></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td><div align="right"><strong>Sujet:</strong></div></td>
<td> </td>
<td width="38%"> <?php $sujet_inc=($result['sujet']); echo"$sujet_inc"; ?></td>
<td width="12%"> <div align="right"><strong>Utilisateur</strong></div></td>
<td width="21%"> <?php $user_inc=($result['utilisateur']); echo"$user_inc"; ?></td>
</tr>
<tr>
<td> </td>
<td><div align="right"><strong>Matériel </strong>:</div></td>
<td> </td>
<td> <?php $mat_inc=($result['materiel']); echo"$mat_inc"; ?></td>
<td><div align="right"><strong>Localisation</strong>:</div></td>
<td> <?php $local_user=($result['localisation']); echo"$local_user"; ?></td>
</tr>
<tr>
<td> </td>
<td><div align="right"><strong>Détails Matériel</strong></div></td>
<td> </td>
<td> <?php $det_mat=($result['details_mat']); echo"$det_mat"; ?></td>
<td><div align="right"><strong>Contacts</strong>:</div></td>
<td> <?php $cont_user=($result['contact']); echo"$cont_user"; ?></td>
</tr>
<tr>
<td> </td>
<td><div align="right"><strong>Priorité</strong>::</div></td>
<td> </td>
<td> <?php $priorite=($result['priorite']); echo"$priorite"; ?></td>
<td> </td>
<td> <?php //$nat_fid=($result['nat_fid']); echo"$nat_fid"; ?></td>
</tr>
<tr>
<td> </td>
<td><div align="right"><strong>Description </strong>:</div></td>
<td> </td>
<td colspan="4"> <?php $desc_inc=($result['description']); echo"$desc_inc"; ?></td>
<tr>
<td> </td>
<td><div align="right"><strong>Com. resolution: </strong></div></td>
<td> </td>
<td> <?php $com_inc=($result['commentaire']); echo"$com_inc"; ?></td>
<td><div align="right"></div></td>
<td> <?php //$causedec_fid=($result['causedec_fid']); echo"$causedec_fid"; ?></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td><div align="right"><strong>Statut</strong>::</div></td>
<td> </td>
<td> <?php $stat_inc=($result['statut']); echo"$stat_inc"; ?></td>
<td><div align="right"><strong>Resolu le:</strong></div></td>
<td> <?php $fin_prev=($result['fin']); echo"$fin_prev"; ?></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td><div align="right">:</div></td>
<td> </td>
<td colspan="4"> </td>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td colspan="4"> </td>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td colspan="4"> </td>
</tr>
<tr>
<td> </td>
<td valign="middle" rowspan="2"> </td>
<td colspan="5" rowspan="2"><?php
};
?>
un lien appercuInc.php dans mon code suiv_inc.php=> appercuInc.php ....Ca.. c'est une page .. non un "lien"
lorsque je clic sur mon lien appercuinc.php il m'affiche : Objet non trouvé! L'URL demandée n'a pas pu être trouvée sur ce serveur....
<?php.
//connection au serveur
require("../gestinc/connexion.php");
//récupération des valeurs des champs:
//etat:
@$etat= $_POST["actif"];
//date :
@$date=date('d-m-Y');
//numero:
@$numero = $_POST["numero"] ;
//incident_père:
@$incident_pere = $_POST["incident_pere"] ;
//statut:
@$statut = $_POST["statut"] ;
//debut prévu:
@$debut_prevu = $_POST["debut_prevu"] ;
//traité avant le :
@$traite = $_POST["traite"] ;
//utilisateur:
@$utilisateur= $_POST["utilisateur"] ;
//contact:
@$contact = $_POST["contact"] ;
//intervenant:
@$intervenant = $_POST["intervenant"];
//localisation :
@$localisation = $_POST["localisation"] ;
// sujet :
@$sujet =$_POST["sujet"];
//priorité:
@$priorite = $_POST["priorite"];
//materiels:
@$materiel= $_POST["materiel"];
//fin de garantie:
@$fin= $_POST["fin"];
//détails sur matériels:
@$details_mat= $_POST["details_mat"];
//description :
@$description = $_POST["description"];
//commentaire:
@$commentaire= $_POST["commentaire"];
//création de la requête SQL:
$sql = "SELECT * FROM incident";
//exécution de la requête SQL:
$requete = mysql_query($sql) or die( mysql_error() ) ;
$total = mysql_num_rows($requete);
//affichage des résultats, pour savoir si l'insertion a marchée:
if($total) {
// debut du tableau
echo '<table bgcolor="#FFFFFF" width="100%" border="0" cellspacing="2" cellpadding="2">'."\n";
// première ligne on affiche les titres prénom et surnom dans 2 colonnes
echo '<tr>';
echo '<td bgcolor="#669999" align="center"><b><u>N°</u></b></td>';
echo '<td bgcolor="#669999" align="center"><b><u>Date de demande</u></b></td>';
echo '<td bgcolor="#669999" align="center"><b><u>Incident</u></b></td>';
echo '<td bgcolor="#669999" align="center"><b><u>utilisateur</u></b></td>';
echo '<td bgcolor="#669999"><b><u>Statut</u></b></td>';
echo '<td bgcolor="#669999" align="center"><b><u>Priorité</u></b></td>';
echo '<td bgcolor="#669999" align="center"><b><u>Aperçu</u></b></td>';
echo '<td bgcolor="#669999" align="center"><b><u>Modifier</u></b></td>';
echo '<td bgcolor="#669999" align="center"><b><u>Annuler</u></b></td>';
echo "</tr>";
// lecture et affichage des résultats sur 2 colonnes, 1 résultat par ligne.
while($row = mysql_fetch_array($requete)) {
echo '<tr>';
echo '<td bgcolor="#f0f0f0">'.'<strong> </strong>'.$row["numero"].'</td>';
echo '<td bgcolor="#f0f0f0">'.$row["debut_prevu"].'</td>';
echo '<td bgcolor="#f0f0f0">'.$row["incident_pere"].'</td>';
echo '<td bgcolor="#f0f0f0">'.$row["utilisateur"].'</td>';
echo '<td bgcolor="#f0f0f0">'.$row["statut"].'</td>';
echo '<td bgcolor="#f0f0f0">'.$row["priorite"].'</td>';
echo '<td bgcolor="#30BDF3" align="center"><a class=top11 href= appercuInc.php?Id='.$row["id"].'><img src=../images/appercu.png title="appercu" width=20 height=20 /></a></td>';
echo '<td bgcolor="#30BDF3" align="center"><a class=top11 href= modif_INCIDENT.php?Id='.$row["id"].'><img src=../images/modifier.png title="modifier" width=20 height=20 /></a></td>';
echo '<td bgcolor="#30BDF3" align="center"><a class=top11 href=modif_inci2.php?Id='.$row["id"].'><img src=../images/cloturer.png title="Clôturer" width=20 height=20 /></a></td>';
echo '</tr>'."\n";
}
echo '</table>'."\n";
// fin du tableau.
}
else
{
echo '<center>Pas d\'enregistrements dans cette table...</center>';
}
?>
voici ma page suiv_inc.php ou se trouve le lienJe suis surement très fatigué.... je ne trouve pas ton lien ..
echo '<td bgcolor="#30BDF3" align="center"><a class=top11 href= appercuInc.php?Id='.$row["id"].'><img src=../images/appercu.png title="appercu" width=20 height=20 /></a></td>';. maintenant je na sais pas mais j'ai verifier tous mes dossiers mais je ne trouve pas d'inconvenients auf peut etre que je me suis trompé quelque part
<a class="top11" href="appercuInc.php?Id='.$row["id"].'">
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question<td><div align="right"><strong>Code incident</strong> :</div></td>lorsque je faire mon aperçu il m'affiche uniquement les champs mais sans les valeurs.
<td> </td>
<td> <?php $num_inc=($result['numero']); echo"<strong>$num_inc</strong>"; ?></td>
<td> </td>
<td> </td>
<td width="7%" rowspan="8"><p align='center'><br /></td>
echo"<strong>$num_inc</strong>";
echo"<strong>".$num_inc."</strong>";
je n'aperçois pas les valeurs enregistrésTu as testé la modif que je t'ai proposé ??
<?php. ce qui ne fonctionne pas se sont mes variables par exemple lorsque je prends cette ligne :
require('../gestinc/connexion.php');
$etat="active";
@$id=$_GET['Id'];
//numero:
@$numero = $_POST["numero"] ;
//incident_père:
@$incident_pere = $_POST["incident_pere"] ;
//statut:
@$statut = $_POST["statut"] ;
//debut prévu:
@$debut_prevu = $_POST["debut_prevu"] ;
//traité avant le :
@$traite = $_POST["traite"] ;
//utilisateur:
@$utilisateur= $_POST["utilisateur"] ;
//contact:
@$contact = $_POST["contact"] ;
//intervenant:
@$intervenant = $_POST["intervenant"];
//localisation :
@$localisation = $_POST["localisation"] ;
// sujet :
@$sujet =$_POST["sujet"];
//priorité:
@$priorite = $_POST["priorite"];
//materiels:
@$materiel= $_POST["materiel"];
//fin de garantie:
@$fin= $_POST["fin"];
//détails sur matériels:
@$details_mat= $_POST["details_mat"];
//description :
@$description = $_POST["description"];
//commentaire:
@$commentaire= $_POST["commentaire"];
// echo "$id et $table";
// $link=mysql_connect("$host","$user","$password") or die('<font color=red>Erreur de connnection</font><br> '.mysql_error() );
//mysql_select_db("$bd") or die('<font color=red>Base inexistante</font><br> '.mysql_error() );
$select_actu = "SELECT id,numero,statut, date_format(debut_prevu, '%d/%m/%Y') AS debut_prevu,date_format(traite,'%d/%m/%Y') AS traite,utilisateur,contact,sujet,materiel,priorite,date_format(fin,'%d/%m/%Y') AS fin,details_mat,description,commentaire,localisation,etat,incident_pere FROM incident WHERE (etat='$etat' && id='$id') ";
$requete = mysql_query($select_actu) or die( "ERREUR MYSQL numéro: ".mysql_errno()."<br>Type de cette erreur: ".mysql_error()."<br>\n" );
while($result=mysql_fetch_array($requete));
{
//$dest="imagesfid/";
//$date="$result[date]";
//$an=substr($date,0,4);
//$mois=substr($date,5,2);
//$jour=substr($date,8,2);
//$date="Publié le<br>$jour-$mois-$an";
//$auteur="Source:<br>$result[auteur]";
?>
<style type="text/css">
<!--
.Style2 {font-size: xx-large}
-->
</style>
<table width=967 border=0 align=center cellspacing=2 bgcolor=#FFFFFF>
<tr>
<td width=232 height=83><div align=center><img src="../images/fsdplogo.jpg " title="Logo du FSDP" alt="Fonds de Soutien et de Developpement de la Presse" width="239" height="80" /></div></td>
<td width=312> </td>
<td width=260><div align="center"><strong>DIRECTION EXECUTIVE<br />
-- -- -- -- -- -- -- -- -- -- -- -- <br />
SERVICE COMMUNICATION ET DOCUMENTATION
</strong></div></td>
</tr>
<tr>
<td><?php
//<table width=957 border=0 align=center class=adminheading>
//<tbody>
//<tr>
//<th width=957 class=cpanel>
//<p align=center style=background:#FFFFFF><strong>APPERCU DE L'Incident : &N° <font color="#FF0000"><?php $num_inc=($result['numero']); echo"$num_inc; </font> </strong> </p></th>
//</tr>
//</tbody>
//</table>
?></td>
<td bgcolor="#F3F0BA"><div align=center><strong>
FICHE DE L'INCIDENT N° <font color=blue><?php $num_inc=($result['numero']); echo'$num_inc'; ?></font></strong><br />
</strong><br />
</div></td>
<td> </td>
</tr>
</table>
<!-- Debut du deuxieme -->
<table class="adminform" align="center" width=""><form name="form2" method="post" action="newInc.php"/><input type="hidden" name="actif" value="active" />
<tbody>
<tr>
<td valign="top">
<div align="center">
<div align="center">
<table cellpadding="0" cellspacing="0" border="0" align="center">
<tr>
<td><table bgcolor="#C7D6F1" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><div align="center">
<table width="957" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td width="5%"> </td>
<td width="16%"> </td>
<td width="1%"> </td>
<td colspan="4"> </td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
<td><div align="right"><strong>Code incident</strong> :</div></td>
<td> </td>
<td> <?php $num_inc=($result['numero']); echo"<strong>'$numero'</strong>"; ?></td>
<td> </td>
<td> </td>
<td width="7%" rowspan="8"><p align='center'><br />
<?php //$immg=($result['img_fid']); echo"<img src=$dest$immg border=0 vspace=0 hspace=0 width=135 height=145 />"; ?>
</p></td>
</tr>
<tr>
<td> </td>
<td><div align="right"><strong>Libéllé Incident</strong> :</div></td>
<td> </td>
<td> <?php $nom_inc=($result['incident_pere']); echo"$nom_inc"; ?></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td height="20"> </td>
<td><div align="right"><strong>Date Incident</strong>:</div></td>
<td> </td>
<td> <?php $date_inc=($result['debut_prevu']); echo"$date_inc"; ?></td>
<td> </td>
<td> </td>
</tr>
<td> <?php $num_inc=($result['numero']); echo"<strong>'$numero'</strong>"; ?></td>il m'affiche seulement le titre mais par les valeurs contenu dans mes variables
<td> <?php $num_inc=($result['numero']); echo"<strong>'$numero'</strong>"; ?></td>
<td> <?php $num_inc=($result['numero']); echo"<strong>'".$numero."'</strong>"; ?></td>
$mavariable = "Ceci est du texte."; echo "$mavariable"; // va afficher $mavariable. echo $mavariable ; // Va afficher : Ceci est du texte echo "test" ; // Va afficher : test. //----- Tu peux mixer du texte avec des variables --------// echo " blabla ".$mavariable; // va afficher : blabla Ceci est du texte.
FICHE DE L'INCIDENT N° <font color=blue><?php $num_inc=($result['numero']); echo $num_inc; ?></font></strong><br />.
<?php $num_inc=($result['numero']); echo"<strong>".$num_inc."</strong>"; ?>
<td> <?php $nom_inc=($result['incident_pere']); echo"$nom_inc"; ?>
<?php $date_inc=($result['debut_prevu']); echo"$date_inc"; ?>
<?php $date_trai=($result['traite']); echo"$date_trai"; ?>
<td width="38%"> <?php $sujet_inc=($result['sujet']); echo"$sujet_inc"; ?></td>
<td> <?php $mat_inc=($result['materiel']); echo"$mat_inc"; ?></td>
il n'affiche seulement que les titresQu'appelles tu TITRE.. le nom de tes variables ?
<?php $mat_inc=($result['materiel']); echo"$mat_inc"; ?></td>
<?php $num_inc=(isset($result['numero']))?$result['numero']:'error'; $nom_inc=(isset($result['incident_pere']))?$result['incident_pere'] : 'error'; $date_inc=($result['debut_prevu']); $date_trai=($result['traite']); $sujet_inc=($result['sujet']); $mat_inc=($result['materiel']); //--------------------------------------------------------// // Pour vérifier que ta variable $result contient bien des résultats : // A effacer une fois que ton script fonctionnera... Echo "<br><b> RESULT => </b> <br>"; print_r($result); Echo "<br>"; //--------------------------------------------------------// ?> FICHE DE L'INCIDENT N° <font color=blue><?=$num_inc;?></font></strong><br /> <strong><?=$num_inc?></strong> <td> <?=$nom_inc;?> <?=$date_inc;?> <?=$date_trai;?> <td width="38%"><?=$sujet_inc;?></td> <td><?=$mat_inc;?></td>
"SELECT id,numero,statut, date_format(debut_prevu, '%d/%m/%Y') AS debut_prevu,date_format(traite,'%d/%m/%Y') AS traite,utilisateur,contact,sujet,materiel,priorite,date_format(fin,'%d/%m/%Y') AS fin,details_mat,description,commentaire,localisation,etat,incident_pere FROM incident WHERE (etat='$etat' && id='$id') ";bon je pense bien que la requete est bonne. excuses moi mais je n'ai jamais testé cette requete dans ma BDD car je ne sais pas comment procéder , j'utilise easyphp pour mon application