Bonsoir je suis entrain de faire un contact.php pour mon flash mais le problème c'est que le serveur que g installer sur ma machine Fedora me renvoi les erreur suivante :
Warning: reset() expects parameter 1 to be array, null given in /var/www/html/www.monsite.com/contact.php on line 15
et
Warning: current() expects parameter 1 to be array, null given in /var/www/html/www.monsite.com/contact.php on line 22
Votre mail a été bien envoyé!
mais je n'ai pas reçu de mail d'où cela pourrai t'il venir du php, du flash ou du serveur je suis perdu la . Je vous met les codes avec peut etre que vous trouverez comme on dit 2 têtes....
Code Flash
Code 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 on (rollOver) { this.gotoAndPlay("s1"); } on (releaseOutside, rollOut) { this.gotoAndPlay("s2"); } on (rollOver) { this.gotoAndPlay("s1"); } on (releaseOutside, rollOut) { this.gotoAndPlay("s2"); } on (release) { for (i=1; i<_parent.fields_descriptions.length; i++) { if (_parent[_parent.fields_descriptions[i][1]]!=_parent.fields_descriptions[i][2]) { this[_parent.fields_descriptions[i][1]]=_parent[_parent.fields_descriptions[i][1]]+"&777&"+_parent.fields_descriptions[i][2]; } _parent.reset_txt(_parent["t"+i], _parent.fields_descriptions[i][1], _parent.fields_descriptions[i][2]); } this.recipient="identifiant@domaine.com"; //i=undefined; getURL("contact.php", "_blank", "POST"); }
Pour le serveur C'est un Fedora 11 avec PHP installer et HTTPD installer
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 <? Error_Reporting(E_ALL & ~E_NOTICE); while ($request = current($_REQUEST)) { if (key($_REQUEST)!='recipient') { $pre_array=split ("&777&", $request); $post_vars[key($_REQUEST)][0]=$pre_array[0]; $post_vars[key($_REQUEST)][1]=$pre_array[1]; } next($_REQUEST); } reset($post_vars); $subject="From ".$post_vars['your_name'][0] ; $headers= "From: ".$post_vars['your_email'][0] ."\n"; $headers.='Content-type: text/html; charset=iso-8859-1'; $message=''; while ($mess = current($post_vars)) { if ((key($post_vars)!="i") && (key($post_vars)!="your_email") && (key($post_vars)!="your_name")) { $message.="<strong>".$mess[1]."</strong> ".$mess[0]."<br>"; } next($post_vars); } mail($_REQUEST['recipient'], $subject, " <html> <head> <title>Contact letter</title> </head> <body> <br> ".$message." </body> </html>" , $headers); echo ("Votre mail a été bien envoyé!"); ?> <script> resizeTo(300, 300); </script>
Merci beaucoup
Partager