bonjour voilà mon soucis :
j'ai ces données sur un site que j'ai téléchargé mais ça ne marche pas lorsque je tente d'envoyer les commentaires sur le formulaire.
pouvez vous m'aider svp :
ce que j'ai comme actionscript (flash cs4) sur mon bouton "send" :
Code :
1. on (rollOver) {
2. this.gotoAndPlay("s1" );
3. }
4. on (releaseOutside, rollOut) {
5. this.gotoAndPlay("s2" );
6. }
7. on (release) {
8. for (i=1; i<_parent.fields_descriptions.length; i++) {
9. if (_parent[_parent.fields_descriptions[1]] != _parent.fields_descriptions[2]) {
10. this[_parent.fields_descriptions[1]] = _parent[_parent.fields_descriptions[1]]+"&777&"+_parent.fields_descriptions[2];
11. }
12. _parent.reset_txt(_parent["t"+i], _parent.fields_descriptions[1], _parent.fields_descriptions[2]);
13. }
14. this.recipient = _parent.rec;
15. i = undefined;
16. getURL("contact."+_parent.serv, "_blank", "POST" );
17. }
PUIS CELA :
rec="monadressemail@hotmail.fr";
serv="php";
var fields_descriptions= Array ("",
Array("t1", "your_name", "Name"),
Array("t2", "your_email", "E-mail"),
Array("t3", "message", "Message")
);
function reset_txt(name,name2,value) {
path=eval(_target);
path[name2]=value;
this[name].onSetFocus=function() {
path=eval(_target);
if(path[name2]==value) { path[name2]="";}
}
this[name].onKillFocus=function() {
path=eval(_target);
if(path[name2]=="") { path[name2]=value;}
}
}
for (i=1; i<=fields_descriptions.length; i++) {
reset_txt("t"+i, fields_descriptions[1], fields_descriptions[2]);
}
SUR LE BOUTON RESET
on (rollOver) {
this.gotoAndPlay("s1");
}
on (releaseOutside, rollOut) {
this.gotoAndPlay("s2");
}
on (release) {
for (i=1; i<_parent.fields_descriptions.length; i++) {
_parent.reset_txt(_parent["t"+i], _parent.fields_descriptions[1], _parent.fields_descriptions[2]);
}
}
ET ENFIN SUR MON FICHIER CONTACT.PHP
<?
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 message a été envoyé avec succès" );
?>
<script>
resizeTo(300, 300);
</script>
Je pense que vous avez tout...pourquoi ça ne marche pas ?