[Tableaux] Problème divers avec tableau
Bonjour,
Je rencontre quelques problèmes avec l'affichage de mon tableau.
1) lorsque l'usager sélectionne dans la liste déroulante, je rafraichis mon tableau mais le contenu de ma liste déroulante revient au premier de la liste au lieu de demeurer sur la sélection effectuée.
2) l'épaisseur de mes TR est trop grand pourtant je n'intervient pas sur le height
3) dans ma liste déroulante, il y a des apostrophes et si l'usager choisit conseil d'administration, ça plante. Erreur: Conseil d\'administrationORA-00000: normal, successful completion
4) Lorsque j'affiche le poste occupé echo '<td align="left">'.htmlspecialchars(trim($detail[8])).'</td>'; , même si le champs est vide, il affiche le contenu de la fiche précédente.
Merci à tous!
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 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
| <div align="center">
<?php
$statut = $_GET['statut'];
$conn = Ora_Logon("php_@prod", "mdp" ) or die(Ora_Error($conn));
$cur = ora_open($conn) or die(Ora_Error($conn));
ora_parse($cur,"SELECT distinct STATUT FROM FON_PHP_STATUT_VUE",$x) or die(Ora_Error($conn));
ora_exec($cur) or die(Ora_Error($conn));
echo '<FORM action="statut.php?" METHOD="GET">';
echo '<p align="center"><select name="statut">';
while(ora_fetch_into($cur,$val))
{
echo "<option>".htmlspecialchars($val[0])."</option>\n";
}
echo '</select>';
echo '<INPUT TYPE="submit" VALUE="Afficher la liste"></p>';
echo '</FORM>';
?>
<table width="800" cellpadding="10px" border="3">
<tr>
<th colspan="5">Liste des personnes (en cours)</th>
</tr>
<tr>
<th width="30">Dossier</th>
<th width="150">Nom</th>
<th width="90">Prénom</th>
<th width="40">Début</th>
<th width="70">Poste occupé</th>
</tr>
<?php
$conn = Ora_Logon("php_fondation@prod", "fokilfas" ) or die(Ora_Error($conn));
$cur = ora_open($conn) or die(Ora_Error($conn));
echo $statut;
ora_parse($cur,"SELECT * FROM FON_PHP_STATUT_VUE
where STATUT='$statut'
and FIN_AN_STATUT='1858-11-17'
order by NOM_FAMILLE, PRENOM",$x)
or die(Ora_Error($conn));
ora_exec($cur) or die(Ora_Error($conn));
$i_actif = 0;
while(ora_fetch_into($cur,$detail)){
$i_actif++;
echo '<tr><td>';
echo htmlspecialchars(trim($detail[0]));
echo '<td align="left">'.htmlspecialchars(trim($detail[1])).'</td>';
echo '<td align="Left">'.htmlspecialchars(trim($detail[2])).'</td>';
if(htmlspecialchars(trim($detail[6]) == "58-11-17" )) {
echo '<td align="Left"> </td>';
}
else {
echo '<td align="Left">'
.htmlspecialchars(substr($detail[6],6,2))
."-".htmlspecialchars(substr($detail[6],3,2))
."-".htmlspecialchars(substr($detail[6],0,2)).'</td>';
}
echo '<td align="left">'.htmlspecialchars(trim($detail[8])).'</td>';
echo '</tr>';
} //fin while
echo '</td></tr>';
echo '<tr><td colspan="6"><b>Nombre de personnes : </b>'.$i_actif;
echo '</table>';
echo '<br><br>';
?> |