Bonjour!
Voila j'étais venu pour un problème d'envois de données d'une popup vers sa page mère!
Maintenant je n'arrive pas à récupérer les données dans la page mère.
j'ai testé:

popup:
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
 
$sql=new sql();
 
$sql->connect(); //On ce connecte
$idcontact=$_GET['id'];
$action=$_GET['action'];
 
 
echo"<html><head><title>Ajouter un contact</title></head>
<body onunload=\"opener.location.reload(true);\">";
switch($action)
 
{
  case"ajout"; //Ajout de l'action
    if(verif($_POST['Nomcontact'])==false){
      echo"Votre champ Nom contact contient des caract&egrave;res interdits";
      echo"<input type=\"button\" onClick=\"javascript:history.back()\" value=\"Retour\">";
      exit;
    }
    if(verif($_POST['Prenomcontact'])==false){
      echo"Votre champ Prenom contact contient des caract&egrave;res interdits";
      echo"<input type=\"button\" onClick=\"javascript:history.back()\" value=\"Retour\">";
      exit;
    }
    if(is_numeric($_POST['Telephonecontact'])==false){
      echo"Votre champ Telephone contact n'est pas compos&eacute; de caract&egrave;res num&eacute;riques";
      echo"<input type=\"button\" onClick=\"javascript:history.back()\" value=\"Retour\">";
      exit;
    }
    if($_POST['Mobilecontact']!="" && is_numeric($_POST['Mobilecontact'])==false){
      echo"Votre champ Mobile contact n'est pas compos&eacute; de caract&egrave;res num&eacute;riques";
      echo"<input type=\"button\" onClick=\"javascript:history.back()\" value=\"Retour\">";
      exit;
    }
    if($_POST['Faxcontact']!="" && is_numeric($_POST['Faxcontact'])==false){
      echo"Votre champ Fax contact n'est pas compos&eacute; de caract&egrave;res num&eacute;riques";
      echo"<input type=\"button\" onClick=\"javascript:history.back()\" value=\"Retour\">";
      exit;
    }
    if($_POST['Mailcontact']!="" && email($_POST['Mailcontact'])==false){
      echo"Votre champ Mail contact n'est pas une adresse email valide";
      echo"<input type=\"button\" onClick=\"javascript:history.back()\" value=\"Retour\">";
      exit;
    }
    if(verif($_POST['Rolecontact'])==false){
      echo"Votre champ Telephone contact n'est pas compos&eacute; de caract&egrave;res num&eacute;riques";
      echo"<input type=\"button\" onClick=\"javascript:history.back()\" value=\"Retour\">";
      exit;
    }
    if($_POST['Commentairecontact']!="" && verif($_POST['Commentairecontact'])==false){
      echo"Votre champ Telephone contact n'est pas compos&eacute; de caract&egrave;res num&eacute;riques";
      echo"<input type=\"button\" onClick=\"javascript:history.back()\" value=\"Retour\">";
      exit;
    }
        $Civilitecontact=strtolower(html_entity_decode($_POST['Civilite']));
	$Nomcontact=strtolower(html_entity_decode($_POST['Nomcontact']));
	$Prenomcontact=strtolower(html_entity_decode($_POST['Prenomcontact']));
	$Telephonecontact=strtolower(html_entity_decode($_POST['Telephonecontact']));
	$Mobilecontact=strtolower(html_entity_decode($_POST['Mobilecontact']));
	$Faxcontact=strtolower(html_entity_decode($_POST['Faxcontact']));
	$Mailcontact=strtolower(html_entity_decode($_POST['Mailcontact']));
	$Rolecontact=strtolower(html_entity_decode($_POST['Rolecontact']));
	$Commentairecontact=strtolower(html_entity_decode($_POST['Commentairecontact']));
 
	$requete="INSERT INTO `tcontact` VALUES ('', 
          '".$civilite."', '".$Nomcontact."', '".$Prenomcontact."', 
          '".$Telephonecontact."', '".$Mobilecontact."', '".$Faxcontact."', 
          '".$Mailcontact."', '".$Rolecontact."', '".$Commentairecontact."');";
 
mysql_query($requete);
 
echo"<br><br><br><br><p align=center><INPUT TYPE='button' NAME='btFermer' VALUE='Fermer la fenêtre' 
     onClick=\"javascript:self.close();\"></p>";
 
 
break;
 
 
 
  default:
 
 
 
 // Affichage de l'action à choisir.
 
 
 
 
echo"<script type='text/javascript' src='../common/inc/verifvide.js'></script>
 
<font size='+2' face='Arial, Helvetica, sans-serif' color='#E2783D'>
<p align=center><strong>contact</strong></p><br>
</font>
 
 
 
 
 
    <form id='myForm' name='form' method='post' action='contact_ajout.php?action=ajout'>
 
 
 
  <style>
 
  .Style3 {color: #000000; font-weight: bold; }
 
  </style>
 
 
 
  <table width='50%' height='177' border='0' cellpadding='15' align=center>
 
      <tr>
        <td>Civilit&eacute; </td>
        <td><SELECT NAME=Civilite>
          <OPTION>M.</OPTION>
          <OPTION>Mme.</OPTION>
          <OPTION>Mlle.</OPTION>
          <OPTION>D.</OPTION>
        </SELECT></td>
      </tr>
      <tr>
        <td>Nom </td>
        <td>
          <input type='text' name='Nomcontact' size='15'>
          <font color='#FF0000'>*</font>
        </td>
      </tr>
      <tr>
        <td>Pr&eacute;nom </td>
        <td>
          <input type='text' name='Prenomcontact' size='15'>
          <font color='#FF0000'>*</font>
        </td>
      </tr>
      <tr>
        <td>T&eacute;l&eacute;phone </td>
        <td>
          <input type='text' name='Telephonecontact' size='15'>
        </td>
      </tr>
      <tr>
        <td>Mobile </td>
        <td>
          <input type='text' name='Mobilecontact' size='25'>
        </td>
      </tr>
      <tr>
        <td>Fax </td>
        <td>
          <input type='text' name='Faxcontact' size='15'>
        </td>
      </tr>
      <tr>
        <td>Courriel </td>
        <td>
          <input type='text' name='Mailcontact' size='25'>
        </td>
      </tr>
      <tr>
        <td>Role </td>
        <td>
          <input type='text' name='Rolecontact' size='25'>
        </td>
      </tr>
      <tr>
        <td>Commentaire </td>
        <td>
          <textarea name='Commentairecontact'  cols='25' rows='7'></textarea>
        </td>
      </tr>
 
	<tr>
<td></td>
</tr>
<tr>
 
<td colspan=2 align=center>
 
 <input type='button' value='Envoyer' style='width: 120px ; height: 25px' 
onclick=\"check_input();
opener.Civilitecontact=document.getElementById('Civilitecontact').value;
opener.Nomcontact=document.getElementById('Nomcontact').value;
opener.Prenomcontact=document.getElementById('Prenomcontact').value;
opener.Telephonecontact=document.getElementById('Telephonecontact').value;
opener.Mobilecontact=document.getElementById('Mobilecontact').value;
opener.Faxcontact=document.getElementById('Faxcontact').value;
opener.Mailcontact=document.getElementById('Mailcontact').value;
opener.Rolecontact=document.getElementById('Rolecontact').value;
opener.Commentairecontact=document.getElementById('Commentairecontact').value;\">
 
  </form>
</td>
</tr>
</table>";
 
}
 
?>
 
</body>
</html>
page mère:

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
 
<script>
  var Civilitecontact;
  var Nomcontact;
  var Prenomcontact;
  var Telephonecontact;
  var Mobilecontact;
  var Faxcontact;
  var Mailcontact;
  var Rolecontact;
  var Commentairecontact;
</script>
 
<?php
$Civilitecontact="<script language='Javascript'> document.write(Civilitecontact); </script>";
$Nomcontact="<script language='Javascript'> document.write(Nomcontact); </script>";
$Prenomcontact="<script language='Javascript'> document.write(Prenomcontact); </script>";
$Telephonecontact="<script language='Javascript'> document.write(Telephonecontact); </script>";
$Mobilecontact="<script language='Javascript'> document.write(Mobilecontact); </script>";
$Faxcontact="<script language='Javascript'> document.write(Faxcontact); </script>";
$Mailcontact="<script language='Javascript'> document.write(Mailcontact); </script>";
$Rolecontact="<script language='Javascript'> document.write(Rolecontact); </script>";
$Commentairecontact="<script language='Javascript'> document.write(Commentairecontact); </script>";
et quand je fais:
echo $Nomcontact.",".$Prenomcontact;

ça m'affiche undefined.

Pourrais-je avoir une aide???