[php]problème de variable pour formulaire
Fermé
shogoki69
Messages postés
9
Date d'inscription
vendredi 4 mai 2007
Statut
Membre
Dernière intervention
4 août 2007
-
4 mai 2007 à 11:38
shogoki69 Messages postés 9 Date d'inscription vendredi 4 mai 2007 Statut Membre Dernière intervention 4 août 2007 - 4 mai 2007 à 22:34
shogoki69 Messages postés 9 Date d'inscription vendredi 4 mai 2007 Statut Membre Dernière intervention 4 août 2007 - 4 mai 2007 à 22:34
A voir également:
- [php]problème de variable pour formulaire
- Formulaire de réclamation facebook - Guide
- Formulaire de reclamation instagram - Guide
- Easy php - Télécharger - Divers Web & Internet
- Confirmer le nouvel envoi du formulaire err_cache_miss - Forum Google Chrome
- Problème d'envoi de formulaire ✓ - Forum PHP
2 réponses
webvoice
Messages postés
8
Date d'inscription
lundi 30 avril 2007
Statut
Membre
Dernière intervention
9 mai 2007
4 mai 2007 à 12:57
4 mai 2007 à 12:57
Dans ton tableau ton bouton de modification tu peu le faire de cette manière
Essaye de faire un genre de formulaire pour ton tableau
en method POST !
et dans ton bouton modification essaye sa
<input type="submit" name="<?php /* tu récupére ta variable id de ta ligne*/ ?>" value="modification">
et quand tu appuye sur le bouton tu est renvoyer dans l autre formulaire, ou tu récupère ta variable grace a $_POST["id"]
et grâce a la magie d'une requête php/sql tu remet en place tout tes informations.
Essaye de faire un genre de formulaire pour ton tableau
en method POST !
et dans ton bouton modification essaye sa
<input type="submit" name="<?php /* tu récupére ta variable id de ta ligne*/ ?>" value="modification">
et quand tu appuye sur le bouton tu est renvoyer dans l autre formulaire, ou tu récupère ta variable grace a $_POST["id"]
et grâce a la magie d'une requête php/sql tu remet en place tout tes informations.
shogoki69
Messages postés
9
Date d'inscription
vendredi 4 mai 2007
Statut
Membre
Dernière intervention
4 août 2007
4 mai 2007 à 14:01
4 mai 2007 à 14:01
Je vien de tester mais a parament ca ne fonctionne pas
(Parse error: parse error, expecting `','' or `';'' in c:\program files\easyphp1-8\www\vdc_test\chantier.php on line 192)
voici la ligne qui ne va pas : echo '<input type="submit" name="<?php $_SESSION['id']= $resultat['id_chantier'];?>" value="Modifier">';
quand je retire le code php qui est entre "" dans name ya plus d'erreur (mais ca ne fait pas ce que je veus evidement :p).
mais pour gardé l'id de la ligne (au moment ou le tableau est généré) je suposse que je doit sauvegarder ca dans une variable de type tableau (pour ne pas ecrasé la valeur de la ligne comme j'ai actuellement ).
la j'avoue que je commenc a perdre le peut de sense logique que j'ai :p
(Parse error: parse error, expecting `','' or `';'' in c:\program files\easyphp1-8\www\vdc_test\chantier.php on line 192)
voici la ligne qui ne va pas : echo '<input type="submit" name="<?php $_SESSION['id']= $resultat['id_chantier'];?>" value="Modifier">';
quand je retire le code php qui est entre "" dans name ya plus d'erreur (mais ca ne fait pas ce que je veus evidement :p).
mais pour gardé l'id de la ligne (au moment ou le tableau est généré) je suposse que je doit sauvegarder ca dans une variable de type tableau (pour ne pas ecrasé la valeur de la ligne comme j'ai actuellement ).
la j'avoue que je commenc a perdre le peut de sense logique que j'ai :p
webvoice
Messages postés
8
Date d'inscription
lundi 30 avril 2007
Statut
Membre
Dernière intervention
9 mai 2007
4 mai 2007 à 14:16
4 mai 2007 à 14:16
Ton erreur semble simple
echo '<input type="submit" name="<?php $_SESSION['id']= $resultat['id_chantier']; ?>" value="Modifier">';
tu n'as pas mis d'espace entre le ; et ?
... test enfin je peu dire une anerie aussi on sait jamais je commence a fatigué c'est la fin de la semaine ..
et les ligne de php commence a être nombreuse aujourd'hui !
echo '<input type="submit" name="<?php $_SESSION['id']= $resultat['id_chantier']; ?>" value="Modifier">';
tu n'as pas mis d'espace entre le ; et ?
... test enfin je peu dire une anerie aussi on sait jamais je commence a fatigué c'est la fin de la semaine ..
et les ligne de php commence a être nombreuse aujourd'hui !
shogoki69
Messages postés
9
Date d'inscription
vendredi 4 mai 2007
Statut
Membre
Dernière intervention
4 août 2007
4 mai 2007 à 14:28
4 mai 2007 à 14:28
je vien de tester et ca ne change rien l'erreur est toujours la même.
Mais je me demande si on peut vraiment metre du php dans la valeur de name. Sa me semble bizard.
Mais je me demande si on peut vraiment metre du php dans la valeur de name. Sa me semble bizard.
webvoice
Messages postés
8
Date d'inscription
lundi 30 avril 2007
Statut
Membre
Dernière intervention
9 mai 2007
>
shogoki69
Messages postés
9
Date d'inscription
vendredi 4 mai 2007
Statut
Membre
Dernière intervention
4 août 2007
4 mai 2007 à 14:41
4 mai 2007 à 14:41
Si si on peu, moi je le fais dans certain formulaire que je dévelloppe actuellement !
j ai un formulaire qui me sert a rentrer des info, a les modifier, et a les supprimer . tout sa en utilisant qu un formulaire
tu pourrais mettre ton code en entier pour voir si y a pas un morceaux quelque part qui met la pagaille ?
j ai un formulaire qui me sert a rentrer des info, a les modifier, et a les supprimer . tout sa en utilisant qu un formulaire
tu pourrais mettre ton code en entier pour voir si y a pas un morceaux quelque part qui met la pagaille ?
shogoki69
Messages postés
9
Date d'inscription
vendredi 4 mai 2007
Statut
Membre
Dernière intervention
4 août 2007
>
shogoki69
Messages postés
9
Date d'inscription
vendredi 4 mai 2007
Statut
Membre
Dernière intervention
4 août 2007
4 mai 2007 à 14:44
4 mai 2007 à 14:44
voila mon code.
il est très brouillon (je suis même géné de le montré). Quand ca sera fonctionelle j'utiliserai des fonctions pour que ca soit plus lisible
merci de m'aider, c'est super gentils
il est très brouillon (je suis même géné de le montré). Quand ca sera fonctionelle j'utiliserai des fonctions pour que ca soit plus lisible
<?php session_start(); if(!isset($_SESSION['login_session'])) die('Accès interdit!'); ?> <html> <head> <?php // Récupère l'heure $localtime = localtime(); $seconde = $localtime[0]; $minute = $localtime[1]; $heure = $localtime[2]; ?> <SCRIPT> bcle=0; function clock() { if (bcle == 0) { heure = <? echo $heure ?>; min = <? echo $minute ?>; sec = <? echo $seconde ?>; } else { sec ++; if (sec == 60) { sec=0; min++; if (min == 60) { min=0; heure++; }; }; }; txt=""; if(heure < 10) { txt += "0"; } txt += heure+ ":"; if(min < 10) { txt += "0" } txt += min + ":"; if(sec < 10) { txt += "0" } txt += sec ; timer = setTimeout("clock()",1000); bcle ++; document.clock.date.value = txt ; } </SCRIPT> <STYLE TYPE="text/css"> form{ display:inline; } .style {border-width: 0;background-color:#005A7B;color: #F2f2f2;} </STYLE> <title>Gestion chantier</title> <style type="text/css"> <!-- body { font: 100% Verdana, Arial, Helvetica, sans-serif; background: #666666; margin: 0; /* it's good practice to zero the margin and padding of the body element to account for differing browser defaults */ padding: 0; text-align: center; /* this centers the container in IE 5* browsers. The text is then set to the left aligned default in the #container selector */ color: #000000; } .oneColElsCtr #container { width: 46em; background: #FFFFFF; margin: 0 auto; /* the auto margins (in conjunction with a width) center the page */ border: 1px solid #000000; text-align: left; /* this overrides the text-align: center on the body element. */ } .oneColElsCtr #mainContent { padding: 0 20px; /* remember that padding is the space inside the div box and margin is the space outside the div box */ } .style1 {color: #0000FF} .style3 { color: #0000FF; font-size: 80%; font-weight: bold; } .style4 {color: #0000FF; font-size: 70%; font-weight: bold; } .tablebgKVZ {background-color:#ff0000;} .tablebgVDC {background-color:#00ccff; } --> </style></head> <body class="oneColElsCtr"> <BODY onLoad="clock()"> <form name="clock" onSubmit="0"> <input type="text" name="date" size="5" readonly="true" class="style"> </form> <div id="container"> <div id="mainContent"> <h1>Tableau des chantiers.</h1> <br> <?php $nb = 18; // Nombre d'affichages souhaités sur une ligne $host = "localhost"; // Serveur SQL $login = "root"; // Login d'accés SQL $pass = ""; // Password d'accés SQL $hostname = "membre"; // Nom de la base de données // connexion à la bdd $bdd = mysql_connect($host, $login, $pass); // selection de la table mysql_select_db($hostname,$bdd); // requête SQL $sql = "SELECT * FROM `chantier` ORDER BY `id_chantier` DESC"; // envoie de la requête $req = mysql_query($sql) or die('<u>Probleme SQL</u> : '.$sql.'<br>'.mysql_error ()); // affichage des résultats avec $nb résultats par ligne if ($_SESSION['login_session']=='vdc' or $_SESSION['login_session']=='VDC' or $_SESSION['login_session']=='kvz' or $_SESSION['login_session']=='KVZ') { echo ' <table width="693" height="123" border="1"> <tr> <td width="50%"><div align="center"><span class="style3">Modification</span></div></td> <td width="50%"><div align="center"><span class="style3">trace </span></div></td> <td width="50%" class="style1"><div align="center" class="style3">adresse </div></td> <td width="50%"><div align="center"> <p><span class="style3">plantation</span></p> <p class="style4">25%</p> </div></td> <td width="50%"><p align="center"><span class="style3">plantation</span></p> <p align="center" class="style4">50% </p></td> <td width="50%" class="style3"><p align="center">plantation</p> <p align="center">75% </p></td> <td width="50%" class="style3"><p align="center">plantation</p> <p align="center">100% </p></td> <td width="50%" class="style3"><p align="center">bt</p> <p align="center">25% </p></td> <td width="50%" class="style3"><p align="center">bt</p> <p align="center">50%</p></td> <td width="50%" class="style3"><p align="center">bt</p> <p align="center">75%</p></td> <td width="50%" class="style3"><p align="center">bt</p> <p align="center">100% </p></td> <td width="50%" class="style3"><p align="center">tvd</p> <p align="center">25%</p></td> <td width="50%" class="style3"><p align="center">tvd</p> <p align="center">50% </p></td> <td width="50%" class="style3"><p align="center">tvd</p> <p align="center">75%</p></td> <td width="50%" class="style3"><p align="center">tvd</p> <p align="center">100% </p></td> <td width="50%" class="style3"><p align="center">deplantation</p> <p align="center">25% </p></td> <td width="50%" class="style3"><p align="center">deplantation</p> <p align="center">50% </p></td> <td width="50%" class="style3"><p align="center">deplantation</p> <p align="center">75% </p></td> <td width="50%" class="style3"><p align="center">deplantation</p> <p align="center">100% </p></td> </tr>'; $i = 1; $cpt=0; while($resultat = mysql_fetch_array($req)) { if($i == 1) { echo'<tr>'; } //$idligne=$resultat['id_chantier']; echo '<td> <form method ="post" action="chantierm.php">'; echo '<input type="submit" name="<?php $_SESSION['id']= $resultat['id_chantier']; ?>" value="Modifier">'; //$_SESSION['tabid[$cpt]'] = $resultat['id_chantier']; echo'</from> '; //echo $resultat['id_chantier']; //echo $_SESSION['tabid[$cpt]']; echo'</td>'; //$_SESSION['idligne'] = $resultat['id_chantier']; //setCookie("vdcabling",$resultat['id_chantier']; if($resultat['tracec'] == 'Oui-VDC' && $resultat['trace']!='') {echo '<td class="tablebgVDC" height="50">';} elseif ( $resultat['tracec'] == 'Oui-KVZ' && $resultat['trace']!='') {echo '<td class="tablebgKVZ" height="50">';} else {echo '<td height="50">';} echo $resultat['trace']; echo'</td>'; if($resultat['adressec'] == 'Oui-VDC' && $resultat['adresse']!='') {echo '<td class="tablebgVDC">';} elseif ( $resultat['adressec'] == 'Oui-KVZ' && $resultat['adresse']!='') {echo '<td class="tablebgKVZ" >';} else {echo '<td >';} echo $resultat['adresse']; echo'</td>'; if($resultat['plantation25'] == 'Oui-VDC') {echo '<td class="tablebgVDC">';} elseif ( $resultat['plantation25'] == 'Oui-KVZ') {echo '<td class="tablebgKVZ" >';} else {echo '<td >';} echo $resultat['plantation25']; echo'<br />'; if( $resultat['date_plant25'] != 'jj-mm-aaaa') {echo '<span style="font-size:11px;">'; echo $resultat['date_plant25']; echo '</span></td>';} else {} echo'</td>'; if($resultat['plantation50'] == 'Oui-VDC') {echo '<td class="tablebgVDC">';} elseif ( $resultat['plantation50'] == 'Oui-KVZ') {echo '<td class="tablebgKVZ" >';} else {echo '<td >';} echo $resultat['plantation50']; echo'</td>'; if($resultat['plantation75'] == 'Oui-VDC') {echo '<td class="tablebgVDC">';} elseif ( $resultat['plantation75'] == 'Oui-KVZ') {echo '<td class="tablebgKVZ" >';} else {echo '<td >';} echo $resultat['plantation75']; echo'</td>'; if($resultat['plantation100'] == 'Oui-VDC') {echo '<td class="tablebgVDC">';} elseif ( $resultat['plantation100'] == 'Oui-KVZ') {echo '<td class="tablebgKVZ" >';} else {echo '<td >';} echo $resultat['plantation100'];echo'<br />'; if( $resultat['date_plant100'] != 'jj-mm-aaaa') {echo '<span style="font-size:11px;">'; echo $resultat['date_plant100']; echo '</span></td>';} else {} echo'</td>'; if($resultat['bt25'] == 'Oui-VDC') {echo '<td class="tablebgVDC">';} elseif ( $resultat['bt25'] == 'Oui-KVZ') {echo '<td class="tablebgKVZ" >';} else {echo '<td >';} echo $resultat['bt25']; echo'<br />'; if( $resultat['date_bt25'] != 'jj-mm-aaaa') {echo '<span style="font-size:11px;">'; echo $resultat['date_bt25']; echo '</span></td>';} else {} echo'</td>'; if($resultat['bt50'] == 'Oui-VDC') {echo '<td class="tablebgVDC">';} elseif ( $resultat['bt50'] == 'Oui-KVZ') {echo '<td class="tablebgKVZ" >';} else {echo '<td >';} echo $resultat['bt50']; echo'</td>'; if($resultat['bt75'] == 'Oui-VDC') {echo '<td class="tablebgVDC">';} elseif ( $resultat['bt75'] == 'Oui-KVZ') {echo '<td class="tablebgKVZ" >';} else {echo '<td >';} echo $resultat['bt75']; echo'</td>'; if($resultat['bt100'] == 'Oui-VDC') {echo '<td class="tablebgVDC">';} elseif ( $resultat['bt100'] == 'Oui-KVZ') {echo '<td class="tablebgKVZ" >';} else {echo '<td >';} echo $resultat['bt100']; echo'<br />'; if( $resultat['date_bt100'] != 'jj-mm-aaaa') {echo '<span style="font-size:11px;">'; echo $resultat['date_bt100']; echo '</span></td>';} else {} echo'</td>'; if($resultat['tvd25'] == 'Oui-VDC') {echo '<td class="tablebgVDC">';} elseif ( $resultat['tvd25'] == 'Oui-KVZ') {echo '<td class="tablebgKVZ" >';} else {echo '<td >';} echo $resultat['tvd25']; echo'<br />'; if( $resultat['date_tvd25'] != 'jj-mm-aaaa') {echo '<span style="font-size:11px;">'; echo $resultat['date_tvd25']; echo '</span></td>';} else {} echo'</td>'; if($resultat['tvd50'] == 'Oui-VDC') {echo '<td class="tablebgVDC">';} elseif ( $resultat['tvd50'] == 'Oui-KVZ') {echo '<td class="tablebgKVZ" >';} else {echo '<td >';} echo $resultat['tvd50']; echo'</td>'; if($resultat['tvd75'] == 'Oui-VDC') {echo '<td class="tablebgVDC">';} elseif ( $resultat['tvd75'] == 'Oui-KVZ') {echo '<td class="tablebgKVZ" >';} else {echo '<td >';} echo $resultat['tvd75']; echo'</td>'; if($resultat['tvd100'] == 'Oui-VDC') {echo '<td class="tablebgVDC">';} elseif ( $resultat['tvd100'] == 'Oui-KVZ') {echo '<td class="tablebgKVZ" >';} else {echo '<td >';} echo $resultat['tvd100']; echo'<br />'; if( $resultat['date_tvd100'] != 'jj-mm-aaaa') {echo '<span style="font-size:11px;">'; echo $resultat['date_tvd100']; echo '</span></td>';} else {} echo'</td>'; if($resultat['deplantation25'] == 'Oui-VDC') {echo '<td class="tablebgVDC">';} elseif ( $resultat['deplantation25'] == 'Oui-KVZ') {echo '<td class="tablebgKVZ" >';} else {echo '<td >';} echo $resultat['deplantation25']; echo'<br />'; if( $resultat['date_dep25'] != 'jj-mm-aaaa') {echo '<span style="font-size:11px;">'; echo $resultat['date_dep25']; echo '</span></td>';} else {} echo'</td>'; if($resultat['deplantation50'] == 'Oui-VDC') {echo '<td class="tablebgVDC">';} elseif ( $resultat['deplantation50'] == 'Oui-KVZ') {echo '<td class="tablebgKVZ" >';} else {echo '<td >';} echo $resultat['deplantation50']; echo'</td>'; if($resultat['deplantation75'] == 'Oui-VDC') {echo '<td class="tablebgVDC">';} elseif ( $resultat['deplantation75'] == 'Oui-KVZ') {echo '<td class="tablebgKVZ" >';} else {echo '<td >';} echo $resultat['deplantation75']; echo'</td>'; if($resultat['deplantation100'] == 'Oui-VDC') {echo '<td class="tablebgVDC">';} elseif ( $resultat['deplantation100'] == 'Oui-KVZ') {echo '<td class="tablebgKVZ" >';} else {echo '<td >';} echo $resultat['deplantation100']; echo'<br />'; if( $resultat['date_dep100'] != 'jj-mm-aaaa') {echo '<span style="font-size:11px;">'; echo $resultat['date_dep100']; echo '</span></td>';} else {} echo'</td> </tr>'; $i++; $cpt++; if($i > $nb) { echo'</tr>'; $i = 1; } } echo'</table>'; }elseif ($_SESSION['login_session']=='electrabel') echo ' <table width="693" height="123" border="1"> <tr> <td width="50%"><div align="center"><span class="style3">Modification</span></div></td> <td width="50%"><div align="center"><span class="style3">trace </span></div></td> <td width="50%" class="style1"><div align="center" class="style3">adresse </div></td> <td width="50%"><div align="center"> <p><span class="style3">plantation</span></p> <p class="style4">25%</p> </div></td> <td width="50%"><p align="center"><span class="style3">plantation</span></p> <p align="center" class="style4">50% </p></td> <td width="50%" class="style3"><p align="center">plantation</p> <p align="center">75% </p></td> <td width="50%" class="style3"><p align="center">plantation</p> <p align="center">100% </p></td> <td width="50%" class="style3"><p align="center">bt</p> <p align="center">25% </p></td> <td width="50%" class="style3"><p align="center">bt</p> <p align="center">50%</p></td> <td width="50%" class="style3"><p align="center">bt</p> <p align="center">75%</p></td> <td width="50%" class="style3"><p align="center">bt</p> <p align="center">100% </p></td> <td width="50%" class="style3"><p align="center">tvd</p> <p align="center">25%</p></td> <td width="50%" class="style3"><p align="center">tvd</p> <p align="center">50% </p></td> <td width="50%" class="style3"><p align="center">tvd</p> <p align="center">75%</p></td> <td width="50%" class="style3"><p align="center">tvd</p> <p align="center">100% </p></td> <td width="50%" class="style3"><p align="center">deplantation</p> <p align="center">25% </p></td> <td width="50%" class="style3"><p align="center">deplantation</p> <p align="center">50% </p></td> <td width="50%" class="style3"><p align="center">deplantation</p> <p align="center">75% </p></td> <td width="50%" class="style3"><p align="center">deplantation</p> <p align="center">100% </p></td> </tr>'; $i = 1; while($resultat = mysql_fetch_array($req)) { //if($resultat[''] if($i == 1) { echo'<tr>'; } if($resultat['tracec'] == 'Oui-VDC' && $resultat['trace']!='') {echo '<td class="tablebgVDC" height="50">';} elseif ( $resultat['tracec'] == 'Oui-KVZ' && $resultat['trace']!='') {echo '<td class="tablebgKVZ" height="50">';} else {echo '<td height="50">';} echo $resultat['trace']; echo'</td>'; if($resultat['adressec'] == 'Oui-VDC' && $resultat['adresse']!='') {echo '<td class="tablebgVDC">';} elseif ( $resultat['adressec'] == 'Oui-KVZ' && $resultat['adresse']!='') {echo '<td class="tablebgKVZ" >';} else {echo '<td >';} echo $resultat['adresse']; echo'</td>'; if($resultat['plantation25'] == 'Oui-VDC') {echo '<td class="tablebgVDC">';} elseif ( $resultat['plantation25'] == 'Oui-KVZ') {echo '<td class="tablebgKVZ" >';} else {echo '<td >';} echo $resultat['plantation25']; echo'<br />'; if( $resultat['date_plant25'] != 'jj-mm-aaaa') {echo '<span style="font-size:11px;">'; echo $resultat['date_plant25']; echo '</span></td>';} else {} echo'</td>'; if($resultat['plantation50'] == 'Oui-VDC') {echo '<td class="tablebgVDC">';} elseif ( $resultat['plantation50'] == 'Oui-KVZ') {echo '<td class="tablebgKVZ" >';} else {echo '<td >';} echo $resultat['plantation50']; echo'</td>'; if($resultat['plantation75'] == 'Oui-VDC') {echo '<td class="tablebgVDC">';} elseif ( $resultat['plantation75'] == 'Oui-KVZ') {echo '<td class="tablebgKVZ" >';} else {echo '<td >';} echo $resultat['plantation75']; echo'</td>'; if($resultat['plantation100'] == 'Oui-VDC') {echo '<td class="tablebgVDC">';} elseif ( $resultat['plantation100'] == 'Oui-KVZ') {echo '<td class="tablebgKVZ" >';} else {echo '<td >';} echo $resultat['plantation100'];echo'<br />'; if( $resultat['date_plant100'] != 'jj-mm-aaaa') {echo '<span style="font-size:11px;">'; echo $resultat['date_plant100']; echo '</span></td>';} else {} echo'</td>'; if($resultat['bt25'] == 'Oui-VDC') {echo '<td class="tablebgVDC">';} elseif ( $resultat['bt25'] == 'Oui-KVZ') {echo '<td class="tablebgKVZ" >';} else {echo '<td >';} echo $resultat['bt25']; echo'<br />'; if( $resultat['date_bt25'] != 'jj-mm-aaaa') {echo '<span style="font-size:11px;">'; echo $resultat['date_bt25']; echo '</span></td>';} else {} echo'</td>'; if($resultat['bt50'] == 'Oui-VDC') {echo '<td class="tablebgVDC">';} elseif ( $resultat['bt50'] == 'Oui-KVZ') {echo '<td class="tablebgKVZ" >';} else {echo '<td >';} echo $resultat['bt50']; echo'</td>'; if($resultat['bt75'] == 'Oui-VDC') {echo '<td class="tablebgVDC">';} elseif ( $resultat['bt75'] == 'Oui-KVZ') {echo '<td class="tablebgKVZ" >';} else {echo '<td >';} echo $resultat['bt75']; echo'</td>'; if($resultat['bt100'] == 'Oui-VDC') {echo '<td class="tablebgVDC">';} elseif ( $resultat['bt100'] == 'Oui-KVZ') {echo '<td class="tablebgKVZ" >';} else {echo '<td >';} echo $resultat['bt100']; echo'<br />'; if( $resultat['date_bt100'] != 'jj-mm-aaaa') {echo '<span style="font-size:11px;">'; echo $resultat['date_bt100']; echo '</span></td>';} else {} echo'</td>'; if($resultat['tvd25'] == 'Oui-VDC') {echo '<td class="tablebgVDC">';} elseif ( $resultat['tvd25'] == 'Oui-KVZ') {echo '<td class="tablebgKVZ" >';} else {echo '<td >';} echo $resultat['tvd25']; echo'<br />'; if( $resultat['date_tvd25'] != 'jj-mm-aaaa') {echo '<span style="font-size:11px;">'; echo $resultat['date_tvd25']; echo '</span></td>';} else {} echo'</td>'; if($resultat['tvd50'] == 'Oui-VDC') {echo '<td class="tablebgVDC">';} elseif ( $resultat['tvd50'] == 'Oui-KVZ') {echo '<td class="tablebgKVZ" >';} else {echo '<td >';} echo $resultat['tvd50']; echo'</td>'; if($resultat['tvd75'] == 'Oui-VDC') {echo '<td class="tablebgVDC">';} elseif ( $resultat['tvd75'] == 'Oui-KVZ') {echo '<td class="tablebgKVZ" >';} else {echo '<td >';} echo $resultat['tvd75']; echo'</td>'; if($resultat['tvd100'] == 'Oui-VDC') {echo '<td class="tablebgVDC">';} elseif ( $resultat['tvd100'] == 'Oui-KVZ') {echo '<td class="tablebgKVZ" >';} else {echo '<td >';} echo $resultat['tvd100']; echo'<br />'; if( $resultat['date_tvd100'] != 'jj-mm-aaaa') {echo '<span style="font-size:11px;">'; echo $resultat['date_tvd100']; echo '</span></td>';} else {} echo'</td>'; if($resultat['deplantation25'] == 'Oui-VDC') {echo '<td class="tablebgVDC">';} elseif ( $resultat['deplantation25'] == 'Oui-KVZ') {echo '<td class="tablebgKVZ" >';} else {echo '<td >';} echo $resultat['deplantation25']; echo'<br />'; if( $resultat['date_dep25'] != 'jj-mm-aaaa') {echo '<span style="font-size:11px;">'; echo $resultat['date_dep25']; echo '</span></td>';} else {} echo'</td>'; if($resultat['deplantation50'] == 'Oui-VDC') {echo '<td class="tablebgVDC">';} elseif ( $resultat['deplantation50'] == 'Oui-KVZ') {echo '<td class="tablebgKVZ" >';} else {echo '<td >';} echo $resultat['deplantation50']; echo'</td>'; if($resultat['deplantation75'] == 'Oui-VDC') {echo '<td class="tablebgVDC">';} elseif ( $resultat['deplantation75'] == 'Oui-KVZ') {echo '<td class="tablebgKVZ" >';} else {echo '<td >';} echo $resultat['deplantation75']; echo'</td>'; if($resultat['deplantation100'] == 'Oui-VDC') {echo '<td class="tablebgVDC">';} elseif ( $resultat['deplantation100'] == 'Oui-KVZ') {echo '<td class="tablebgKVZ" >';} else {echo '<td >';} echo $resultat['deplantation100']; echo'<br />'; if( $resultat['date_dep100'] != 'jj-mm-aaaa') {echo '<span style="font-size:11px;">'; echo $resultat['date_dep100']; echo '</span></td>';} else {} echo'</td> </tr>'; $i++; if($i > $nb) { echo'</tr>'; $i = 1; } } echo'</table>'; ?> <?php if ($_SESSION['login_session']=='vdc' or $_SESSION['login_session']=='VDC') { echo' <p> </p> <h2>tableau</h2> <form method ="post" action="chantierf.php"> <table width="693" height="123" border="1"> <tr> <td width="50%"><div align="center"><span class="style3">trace </span></div></td> <td width="50%" class="style1"><div align="center" class="style3">adresse </div></td> <td width="50%"><div align="center"> <p><span class="style3">plantation</span></p> <p class="style4">25%</p> </div></td> <td width="50%"><p align="center"><span class="style3">plantation</span></p> <p align="center" class="style4">50% </p></td> <td width="50%" class="style3"><p align="center">plantation</p> <p align="center">75% </p></td> <td width="50%" class="style3"><p align="center">plantation</p> <p align="center">100% </p></td> <td width="50%" class="style3"><p align="center">bt</p> <p align="center">25% </p></td> <td width="50%" class="style3"><p align="center">bt</p> <p align="center">50%</p></td> <td width="50%" class="style3"><p align="center">bt</p> <p align="center">75%</p></td> <td width="50%" class="style3"><p align="center">bt</p> <p align="center">100% </p></td> <td width="50%" class="style3"><p align="center">tvd</p> <p align="center">25%</p></td> <td width="50%" class="style3"><p align="center">tvd</p> <p align="center">50% </p></td> <td width="50%" class="style3"><p align="center">tvd</p> <p align="center">75%</p></td> <td width="50%" class="style3"><p align="center">tvd</p> <p align="center">100% </p></td> <td width="50%" class="style3"><p align="center">deplantation</p> <p align="center">25% </p></td> <td width="50%" class="style3"><p align="center">deplantation</p> <p align="center">50% </p></td> <td width="50%" class="style3"><p align="center">deplantation</p> <p align="center">75% </p></td> <td width="50%" class="style4"><p align="center">deplantation</p> <p align="center">100% </p></td> </tr> <tr> <td height="50"><input type="text" name="trace"> <SELECT NAME="tracec"> <OPTION>Non <OPTION >Oui-VDC <OPTION >Oui-KVZ </SELECT></td> <td><input type="text" name="adresse"> <SELECT NAME="adressec"> <OPTION>Non <OPTION >Oui-VDC <OPTION >Oui-KVZ </SELECT></td> <td>fait <SELECT NAME="plantation25"> <OPTION>Non <OPTION >Oui-VDC <OPTION >Oui-KVZ </SELECT><br />date: <input type="text" name="date_plant25" size="8" value="jj-mm-aaaa"/></td> <td>fait <SELECT NAME="plantation50"> <OPTION>Non <OPTION >Oui-VDC <OPTION >Oui-KVZ </SELECT> </td> <td>fait <SELECT NAME="plantation75"> <OPTION>Non <OPTION >Oui-VDC <OPTION >Oui-KVZ </SELECT></td> <td>fait <SELECT NAME="plantation100"> <OPTION>Non <OPTION >Oui-VDC <OPTION >Oui-KVZ </SELECT><br />date: <input type="text" name="date_plant100" size="8" value="jj-mm-aaaa" /></td> <td>fait <SELECT NAME="bt25"> <OPTION>Non <OPTION >Oui-VDC <OPTION >Oui-KVZ </SELECT><br />date: <input type="text" name="date_bt25" size="8" value="jj-mm-aaaa" /></td> <td>fait <SELECT NAME="bt50"> <OPTION>Non <OPTION >Oui-VDC <OPTION >Oui-KVZ </SELECT></td> <td>fait <SELECT NAME="bt75"> <OPTION>Non <OPTION >Oui-VDC <OPTION >Oui-KVZ </SELECT></td> <td>fait <SELECT NAME="bt100"> <OPTION>Non <OPTION >Oui-VDC <OPTION >Oui-KVZ </SELECT><br />date: <input type="text" name="date_bt100" size="8" value="jj-mm-aaaa" /></td> <td>fait <SELECT NAME="tvd25"> <OPTION>Non <OPTION >Oui-VDC </SELECT><br />date: <input type="text" name="date_tvd25" size="8" value="jj-mm-aaaa" /></td> <td>fait <SELECT NAME="tvd50"> <OPTION>Non <OPTION >Oui-VDC </SELECT></td> <td>fait <SELECT NAME="tvd75"> <OPTION>Non <OPTION >Oui-VDC </SELECT></td> <td>fait <SELECT NAME="tvd100"> <OPTION>Non <OPTION >Oui-VDC </SELECT><br />date: <input type="text" name="date_tvd100" size="8" value="jj-mm-aaaa" /></td> <td>fait <SELECT NAME="deplantation25"> <OPTION>Non <OPTION >Oui-VDC <OPTION >Oui-KVZ </SELECT><br />date: <input type="text" name="date_dep25" size="8" value="jj-mm-aaaa" /></td> <td>fait <SELECT NAME="deplantation50"> <OPTION>Non <OPTION >Oui-VDC <OPTION >Oui-KVZ </SELECT></td> <td>fait <SELECT NAME="deplantation75"> <OPTION>Non <OPTION >Oui-VDC <OPTION >Oui-KVZ </SELECT></td> <td>fait <SELECT NAME="deplantation100"> <OPTION>Non <OPTION >Oui-VDC <OPTION >Oui-KVZ </SELECT><br />date: <input type="text" name="date_dep100" size="8" value="jj-mm-aaaa" /></td> <input type="submit" name="submit" value="envoyer"> </tr> </table> </form>'; }elseif ($_SESSION['login_session']=='kvz' or $_SESSION['login_session']=='KVZ') echo' <p> </p> <h2>tableau</h2> <form method ="post" action="chantierf.php"> <table width="693" height="123" border="1"> <tr> <td width="50%"><div align="center"><span class="style3">trace </span></div></td> <td width="50%" class="style1"><div align="center" class="style3">adresse </div></td> <td width="50%"><div align="center"> <p><span class="style3">plantation</span></p> <p class="style4">25%</p> </div></td> <td width="50%"><p align="center"><span class="style3">plantation</span></p> <p align="center" class="style4">50% </p></td> <td width="50%" class="style3"><p align="center">plantation</p> <p align="center">75% </p></td> <td width="50%" class="style3"><p align="center">plantation</p> <p align="center">100% </p></td> <td width="50%" class="style3"><p align="center">bt</p> <p align="center">25% </p></td> <td width="50%" class="style3"><p align="center">bt</p> <p align="center">50%</p></td> <td width="50%" class="style3"><p align="center">bt</p> <p align="center">75%</p></td> <td width="50%" class="style3"><p align="center">bt</p> <p align="center">100% </p></td> <td width="50%" class="style3"><p align="center">tvd</p> <p align="center">25%</p></td> <td width="50%" class="style3"><p align="center">tvd</p> <p align="center">50% </p></td> <td width="50%" class="style3"><p align="center">tvd</p> <p align="center">75%</p></td> <td width="50%" class="style3"><p align="center">tvd</p> <p align="center">100% </p></td> <td width="50%" class="style3"><p align="center">deplantation</p> <p align="center">25% </p></td> <td width="50%" class="style3"><p align="center">deplantation</p> <p align="center">50% </p></td> <td width="50%" class="style3"><p align="center">deplantation</p> <p align="center">75% </p></td> <td width="50%" class="style4"><p align="center">deplantation</p> <p align="center">100% </p></td> </tr> <tr> <td height="50"><input type="text" name="trace"> <SELECT NAME="tracec"> <OPTION>Non <OPTION >Oui-VDC <OPTION >Oui-KVZ </SELECT></td> <td><input type="text" name="adresse"> <SELECT NAME="adressec"> <OPTION>Non <OPTION >Oui-VDC <OPTION >Oui-KVZ </SELECT></td> <td>fait <SELECT NAME="plantation25"> <OPTION>Non <OPTION >Oui-VDC <OPTION >Oui-KVZ </SELECT><br />date: <input type="text" name="date_plant25" size="8" value="jj-mm-aaaa"/></td> <td>fait <SELECT NAME="plantation50"> <OPTION>Non <OPTION >Oui-VDC <OPTION >Oui-KVZ </SELECT> </td> <td>fait <SELECT NAME="plantation75"> <OPTION>Non <OPTION >Oui-VDC <OPTION >Oui-KVZ </SELECT></td> <td>fait <SELECT NAME="plantation100"> <OPTION>Non <OPTION >Oui-VDC <OPTION >Oui-KVZ </SELECT><br />date: <input type="text" name="date_plant100" size="8" value="jj-mm-aaaa" /></td> <td>fait <SELECT NAME="bt25"> <OPTION>Non <OPTION >Oui-VDC <OPTION >Oui-KVZ </SELECT><br />date: <input type="text" name="date_bt25" size="8" value="jj-mm-aaaa" /></td> <td>fait <SELECT NAME="bt50"> <OPTION>Non <OPTION >Oui-VDC <OPTION >Oui-KVZ </SELECT></td> <td>fait <SELECT NAME="bt75"> <OPTION>Non <OPTION >Oui-VDC <OPTION >Oui-KVZ </SELECT></td> <td>fait <SELECT NAME="bt100"> <OPTION>Non <OPTION >Oui-VDC <OPTION >Oui-KVZ </SELECT><br />date: <input type="text" name="date_bt100" size="8" value="jj-mm-aaaa" /></td> <td>A remplire<br/>par VDC</td> <td>A remplire<br/>par VDC</td> <td>A remplire<br/>par VDC</td> <td>A remplire<br/>par VDC</td> <td>fait <SELECT NAME="deplantation25"> <OPTION>Non <OPTION >Oui-VDC <OPTION >Oui-KVZ </SELECT><br />date: <input type="text" name="date_dep25" size="8" value="jj-mm-aaaa" /></td> <td>fait <SELECT NAME="deplantation50"> <OPTION>Non <OPTION >Oui-VDC <OPTION >Oui-KVZ </SELECT></td> <td>fait <SELECT NAME="deplantation75"> <OPTION>Non <OPTION >Oui-VDC <OPTION >Oui-KVZ </SELECT></td> <td>fait <SELECT NAME="deplantation100"> <OPTION>Non <OPTION >Oui-VDC <OPTION >Oui-KVZ </SELECT><br />date: <input type="text" name="date_dep100" size="8" value="jj-mm-aaaa" /></td> <input type="submit" name="submit" value="envoyer"> </tr> </table> </form>'; ?> <p> </p> <p> </p> <p align="center">Retour <a href="index2.php">index.</a></p> <p align="right"><a href="logout.php">Deconection</a></p> <p align="center"> </p> <p> </p> <!-- end #mainContent --></div> <!-- end #container --></div> </body> </html>
merci de m'aider, c'est super gentils
webvoice
Messages postés
8
Date d'inscription
lundi 30 avril 2007
Statut
Membre
Dernière intervention
9 mai 2007
>
shogoki69
Messages postés
9
Date d'inscription
vendredi 4 mai 2007
Statut
Membre
Dernière intervention
4 août 2007
4 mai 2007 à 15:09
4 mai 2007 à 15:09
remplace ta ligne 193 par celle-ci
echo '<input type="submit" name="'<?php $_SESSION['id']= $resultat['id_chantier']; ?>'" value="Modifier">';
echo '<input type="submit" name="'<?php $_SESSION['id']= $resultat['id_chantier']; ?>'" value="Modifier">';