Bonjour,
Voila j'ai une popup avec des informations dedans.
Je suis actuellement entrain de créer une popup identique mais avec des input afin de pouvoir modifier les données qui sont dans ma premiere popup (on accède à la seconde par un bouton modifier)
Mais lors de la création de ma popup de modification j'ai rencontré pas mal d'erreur, et je ne comprend pas pourquoi car mes requetes sont identiques ...
Je vous met mon code ci dessous et un imprim ecran de ma popup avec ses erreurs :
Index.php :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9 <a class="lien3" href="#" title="En savoir plus ..." onclick="window.open ('popup.php?formateur=<?php echo( $row['nom_formateur'] ); ?>&statut=<?php echo( $row4['description_statut'] ); ?>&coeff=<?php echo( $row3['valeur_coeff'] ); ?>&type=<?php echo( $row2['nom_type'] ); ?>&code=<?php echo( $row1['code_resa'] ); ?>&heure=<?php echo( $heure ); ?>&minute=<?php echo( $minute ); ?>&date=<?php echo( $row1['date'] ); ?>&duree=<?php echo( $row1['duree'] ); ?>&heure_fin=<?php echo( $row1['heure_fin'] ); ?>&hc=<?php echo( $Total4 ); ?>&cree_par=<?php echo( $row1['cree_par'] ); ?>&description=<?php echo( $row1['description_resa'] );?>&observation=<?php echo( $row1['observation_resa'] );?>' , 'popup' , 'width=550,height=265,top=300,left=400,location=yes' ); return false;" >
Popup.php :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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 echo "<table border='1' cellpadding='0' cellspacing='0' width='100%' bordercolor='#000066'> <tr><td bgcolor='#99CCFF' width='35%'> Code : <font size=2 color=#000066><b> " . $_GET['code'] . "</font></td> <td rowspan=5 bgcolor='#99CCFF' width='65%' valign=top> Description : <font size=2 color=#000066><b> " . $_GET['description'] . "</font></td></tr> <tr><td bgcolor='#99CCFF'> Date : <font size=2 color=#000066><b> " . $_GET['date'] . "</font></td></tr> <tr><td bgcolor='#99CCFF'> Heure début: <font size=2 color=#000066><b> " . $_GET['heure'] . ':' . $_GET['minute'] ."</font></td></tr> <tr><td bgcolor='#99CCFF'> Durée : <font size=2 color=#000066><b> " . $_GET['duree'] . "</font></td></tr> <tr><td bgcolor='#99CCFF'> Heure fin: <font size=2 color=#000066><b> " . $_GET['heure_fin'] ."</font></td></tr> <tr><td bgcolor='#99CCFF'> H. Comptabilisées : <font size=2 color=#000066><b> " . $_GET['hc'] . "</font></td> <td rowspan=6 bgcolor='#99CCFF' valign=top> Observation : <font size=2 color=#000066><b> " . $_GET['observation'] . "</font></td></tr> <tr><td bgcolor='#99CCFF'> Formateur : <font size=2 color=#000066><b> " . $_GET['formateur'] . "</font></td></tr> <tr><td bgcolor='#99CCFF'> Statut : <font size=2 color=#000066><b> " . $_GET['statut'] . "</font></td></tr> <tr><td bgcolor='#99CCFF'> Type : <font size=2 color=#000066><b> " . $_GET['type'] . "</font></td></tr> <tr><td bgcolor='#99CCFF'> Coeff : <font size=2 color=#000066><b> " . $_GET['coeff']."</font></td></tr> <tr><td bgcolor='#99CCFF'> Crée par : <font size=2 color=#000066><b> " . $_GET['cree_par'] . "</font></td></tr></table>"; $formateur = $_GET['formateur']; $heure = $_GET['heure']; $minute = $_GET['minute']; if(isset($_SESSION['login'])) { ?> <table border=0 width='100%'> <tr> <td align='center' width='100%'> <form action='modification_popup.php?formateur2=<?php echo( $formateur ); ?>&heure2=<?php echo( $heure ); ?>&minute2=<?php echo( $minute ); ?>&date=<?php echo( $row1['date'] ); ?>' method='get'> <input type=submit value=Modifier></form> </td> </tr> </table> <? } ?>
Modification_popup.php :
Merci d'avance, je suis sur ce problème depuis plusieurs heures maintenant et je suis vraiment dans une impasse :s
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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 <? require("date.php"); $sql = "select num_formateur, nom_formateur, prenom_formateur, description_formateur from formateur order by num_formateur"; $result = mysql_query($sql); $row = mysql_fetch_array($result); echo '<td><font size="-3"><small><center>'; // Récupération de la table reservation $sql1 = "select * from reservation where num_formateur = " . $result['num_formateur'] . " and heure_debut = '" . $_GET['heure2'] . ":" . $_GET['minute2'] . "' and date = '" . date("d/m/Y",$ref) . "'"; $result1 = mysql_query($sql1); $row1 = mysql_fetch_array($result1); // Récupération des statuts, coefficients, et types $sql2 = "select nom_type from reservation r, type_reservation t where r.num_type = t.num_type and r.num_type= " . $row1['num_type'] . ""; $result2 = mysql_query($sql2); $row2 = mysql_fetch_array($result2); $sql3 = "select valeur_coeff from reservation r, coefficient c where r.num_coeff = c.num_coeff and r.num_coeff= " . $row1['num_coeff'] . ""; $result3 = mysql_query($sql3); $row3 = mysql_fetch_array($result3); $sql4 = "select nom_statut, description_statut from reservation r, statut s where r.num_statut = s.num_statut and r.num_statut= " . $row1['num_statut'] . ""; $result4 = mysql_query($sql4); $row4 = mysql_fetch_array($result4); require('hc.php');; echo $row2['nom_type']; ?> <form action="modifier_popup.php" method="post" name="type"> <table border='1' cellpadding='0' cellspacing='0' width='100%' bordercolor='#000066'> <tr><td bgcolor='#99CCFF' width='35%'> Code : <font size=2 color=#000066><b> <? echo $row1['code_resa']; ?></font></td> <td rowspan=5 bgcolor='#99CCFF' valign='top' width='65%'> Description : <font size=2 color=#000066><b><textarea name="description_resa" cols="40" rows="8"><? echo $row1['description_resa']; ?></textarea></font></td></tr> <tr><td bgcolor='#99CCFF'> Date : <font size=2 color=#000066><b> <input name="date" type="text" value="<? echo $row1['date']; ?>" size="8" ></font></td></tr> <tr><td bgcolor='#99CCFF'> Heure début: <font size=2 color=#000066><b><input name="heure_debut" type="text" value="<? echo $row1['heure_debut']; ?>" size="8" ></font></td></tr> <tr><td bgcolor='#99CCFF'> Durée : <font size=2 color=#000066><b><input name="duree" type="text" value="<? echo $row1['duree']; ?>" size="8" ></font></td></tr> <tr><td bgcolor='#99CCFF'> Heure fin: <font size=2 color=#000066><b><input name="heure_fin" type="text" value="<? echo $row1['heure_fin']; ?>" size="8" ></font></td></tr> <tr><td bgcolor='#99CCFF'> H. Comptabilisées : <font size=2 color=#000066><b> <input name="hc" type="text" value="<? echo $Total4; ?>" size="1" ></font></td> <td rowspan=6 bgcolor='#99CCFF' valign='top'> Observation : <font size=2 color=#000066><b> <textarea name="observation_resa" cols="40" rows="8"><? echo $row1['observation_resa']; ?></textarea></font></td></tr> <tr><td bgcolor='#99CCFF'> Formateur : <font size=2 color=#000066><b> <input name="nom_formateur" type="text" value="<? echo $row1['nom_formateur']; ?>" size="8" ></font></td></tr> <tr><td bgcolor='#99CCFF'> Statut : <font size=2 color=#000066><b> <input name="statut" type="text" value="<? echo $row4['statut']; ?>" size="8" ></font></td></tr> <tr><td bgcolor='#99CCFF'> Type : <font size=2 color=#000066><b> <input name="nom_type" type="text" value="<? echo $row2['nom_type']; ?>" size="8" ></font></td></tr> <tr><td bgcolor='#99CCFF'> Coeff : <font size=2 color=#000066><b> <input name="valeur_coeff" type="text" value="<? echo $row3['valeur_coeff']; ?>" size="8" ></font></td></tr> <tr><td bgcolor='#99CCFF'> Crée par : <font size=2 color=#000066><b> <input name="cree_par" type="text" value="<? echo $row1['cree_par']; ?>" size="8" ></font></td></tr></table>
Partager