(Re)Bonjour. J'espère avoir le droit de poster à nouveau ici en si peu de temps, sinon je m'abstiendrais.
J'ai un problème (toujours) sur mon site intranet.
Via une interface web, je peux modifier des données dans ma BDD (ajouter, supprimer, modifier). Mais pour un des champs, la modification ne fonctionne pas correctement... J'ai tenter de trifouiller (depuis un bon moment déjà...) mais sans résultat.
Voici l'interface en question :
Et voici les deux pages qui gèrent le tout :
<?php
include('../init.php');
echo "<h1>Liste des intervenants</h1>";
echo "<div style='margin-left:5px;'><input type='button' value='Ajouter' onClick=showDiv('formNewInt');hideDiv('btAdd'); id='btAdd' /></div>";
echo "<div id='formNewInt' style='margin-left:5px;display:none'>";
echo "<span style='block; float:left; width: 63px; padding-top: 5px;'>Nom</span>";
echo "<input type='text' id='nomInt' size='20' /><br/>";
echo "<span style='block; float:left; width: 63px; padding-top: 5px;'>Téléphone</span>";
echo "<input type='text' id='telephoneInt' size='20' style='margin: 3px 0 3px 0;' maxlength='10' /><br/>";
echo "<input type='button' value='Ajouter' style='margin-left:5px;' onClick=goAddIntervenant(''); />";
echo "<input type='button' value='Annuler' style='margin-left:5px;' onClick=hideDiv('formNewInt');showDiv('btAdd'); />";
echo "</div>";
echo "<div id='contenu2' style='overflow:auto;height:200px;'>";
echo "</div>";
echo "<div class='cadreEntete'>";
echo "<input type='button' value='Fermer' onClick=majCDG(); />";
echo "</div>";
?>
<?php
include('../init.php');
$cptColor=0;
$reqListInt=verifReq("SELECT * FROM cdgintervenant ORDER BY nom");
while($rowInt=mysql_fetch_object($reqListInt)){
$cptColor++;
$idInt=$rowInt->idInt;
echo "<div class='btAddRight' id='btAdd$idInt'>";
echo "<input type='button' value='Edit' onClick=showDiv('btMod$idInt');showDiv('mod$idInt');hideDiv('aff$idInt');hideDiv('btAdd$idInt'); />";
echo " <input type='button' value='X' onClick=goDelInt('$idInt'); />";
echo "</div>";
echo "<p class='case$cptColor' style='padding-bottom:10px;' id='aff$idInt'>";
echo $rowInt->nom;
echo ( $rowInt->telephone ) ? " - ".$rowInt->telephone : "";
echo "</p>";
echo "<div class='btAddRight' style='display:none;' id='btMod$idInt'>";
echo "<input type='button' value='Modifier' onClick=goAddIntervenant('$idInt'); />";
echo "<input type='button' value='Annuler' onClick=hideDiv('btMod$idInt');hideDiv('mod$idInt');showDiv('aff$idInt');showDiv('btAdd$idInt'); />";
echo "</div>";
echo "<p class='case$cptColor' style='padding-bottom:10px;display:none;' id='mod$idInt'>";
echo "<span style='block; float:left; width: 63px; padding-top: 5px;'>Nom</span>";
echo "<input type='txt' size='16' value=\"".$rowInt->nom."\" id='nom$idInt' /><br/>";
echo "<span style='block; float:left; width: 63px; padding-top: 5px;'>Téléphone</span>";
echo "<input type='txt' size='16' value=\"".$rowInt->telephone."\" id='telephone$idInt' maxlength='10' />";
echo "</p>";
if($cptColor>=2){
$cptColor=0;
}
}
echo "<br/>";
?>
Lorsque je tente de modifier la partie téléphone, la txt_box faite pour s'efface, tout simplement. Elle ne prend pas en compte mes modifications :
De même, si je rentre manuellement les données dans ma BDD et que j'essaie de les modifier via l'interface, le numéro s'efface, aussi bien de la txt_box que de la BDD.
Comment puis-je rectifier cela ? Je vous remercie d'avance.
(Re)Bonjour. J'espère avoir le droit de poster à nouveau ici en si peu de temps, sinon je m'abstiendrais.
J'ai un problème (toujours) sur mon site intranet.
Via une interface web, je peux modifier des données dans ma BDD (ajouter, supprimer, modifier). Mais pour un des champs, la modification ne fonctionne pas correctement... J'ai tenter de trifouiller (depuis un bon moment déjà...) mais sans résultat.
Voici l'interface en question :
[img]http://img15.hostingpics.net/pics/696937Sanstitre2.png[/img]
Et voici les deux pages qui gèrent le tout :
[php]<?php
include('../init.php');
echo "<h1>Liste des intervenants</h1>";
echo "<div style='margin-left:5px;'><input type='button' value='Ajouter' onClick=showDiv('formNewInt');hideDiv('btAdd'); id='btAdd' /></div>";
echo "<div id='formNewInt' style='margin-left:5px;display:none'>";
echo "<span style='block; float:left; width: 63px; padding-top: 5px;'>Nom</span>";
echo "<input type='text' id='nomInt' size='20' /><br/>";
echo "<span style='block; float:left; width: 63px; padding-top: 5px;'>Téléphone</span>";
echo "<input type='text' id='telephoneInt' size='20' style='margin: 3px 0 3px 0;' maxlength='10' /><br/>";
echo "<input type='button' value='Ajouter' style='margin-left:5px;' onClick=goAddIntervenant(''); />";
echo "<input type='button' value='Annuler' style='margin-left:5px;' onClick=hideDiv('formNewInt');showDiv('btAdd'); />";
echo "</div>";
echo "<div id='contenu2' style='overflow:auto;height:200px;'>";
echo "</div>";
echo "<div class='cadreEntete'>";
echo "<input type='button' value='Fermer' onClick=majCDG(); />";
echo "</div>";
?>[/php]
[php]<?php
include('../init.php');
$cptColor=0;
$reqListInt=verifReq("SELECT * FROM cdgintervenant ORDER BY nom");
while($rowInt=mysql_fetch_object($reqListInt)){
$cptColor++;
$idInt=$rowInt->idInt;
echo "<div class='btAddRight' id='btAdd$idInt'>";
echo "<input type='button' value='Edit' onClick=showDiv('btMod$idInt');showDiv('mod$idInt');hideDiv('aff$idInt');hideDiv('btAdd$idInt'); />";
echo " <input type='button' value='X' onClick=goDelInt('$idInt'); />";
echo "</div>";
echo "<p class='case$cptColor' style='padding-bottom:10px;' id='aff$idInt'>";
echo $rowInt->nom;
echo ( $rowInt->telephone ) ? " - ".$rowInt->telephone : "";
echo "</p>";
echo "<div class='btAddRight' style='display:none;' id='btMod$idInt'>";
echo "<input type='button' value='Modifier' onClick=goAddIntervenant('$idInt'); />";
echo "<input type='button' value='Annuler' onClick=hideDiv('btMod$idInt');hideDiv('mod$idInt');showDiv('aff$idInt');showDiv('btAdd$idInt'); />";
echo "</div>";
echo "<p class='case$cptColor' style='padding-bottom:10px;display:none;' id='mod$idInt'>";
echo "<span style='block; float:left; width: 63px; padding-top: 5px;'>Nom</span>";
echo "<input type='txt' size='16' value=\"".$rowInt->nom."\" id='nom$idInt' /><br/>";
echo "<span style='block; float:left; width: 63px; padding-top: 5px;'>Téléphone</span>";
echo "<input type='txt' size='16' value=\"".$rowInt->telephone."\" id='telephone$idInt' maxlength='10' />";
echo "</p>";
if($cptColor>=2){
$cptColor=0;
}
}
echo "<br/>";
?>[/php]
Lorsque je tente de modifier la partie téléphone, la txt_box faite pour s'efface, tout simplement. Elle ne prend pas en compte mes modifications :
[img]http://img15.hostingpics.net/pics/528577Sanstitre1.png[/img]
De même, si je rentre manuellement les données dans ma BDD et que j'essaie de les modifier via l'interface, le numéro s'efface, aussi bien de la txt_box que de la BDD.
Comment puis-je rectifier cela ? Je vous remercie d'avance.