contact form mit php und actionscript: fehler [Flash CS3]
| Beiträge: 9 Registriert: Apr 2010
| 13.04.2010, 11:54
ich habe ein contact form erstellt für meine homepage visuallab.ch
es funktioniert aber nicht 100% korrekt...ich bekomme zwar die mails sehe aber den sender nicht...
im mailbox bekomme das was in email, message und adresse aber nicht was unter firma steht...
habe etwa 20 versuche gemacht aber es klappt immer etwas nicht.
wieso? wo ist genau der Fehler (kenne mich leider nicht genug gut aus mit AS und PHP deswegen bitte möglichst präzis erklären)
ActionScript: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 | stop();
System.useCodepage = true;
send_btn.onRelease = function() {
my_vars = new LoadVars();
my_vars.sender = email_box.text;
my_vars.subject = subject_box.text;
my_vars.message = message_box.text;
my_vars.adresse = adresse_box.text;
if (my_vars.sender != "" and my_vars.subject != "" and my_vars.message != "" and my_vars.adresse != "") {
my_vars.sendAndLoad("mailer.php", my_vars, "POST");
gotoAndStop(2);
} else {
error_clip.gotoAndPlay(2);
}
my_vars.onLoad = function() {
gotoAndStop(5);
};
};
email_box.onSetFocus = subject_box.onSetFocus=message_box.onSetFocus=function () {
if (error_clip._currentframe != 1) {
error_clip.gotoAndPlay(6);
}
};
|
PHP: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
|
<?php
/* ---------------------------
php and flash contact form.
by www.MacromediaHelp.com
---------------------------
Note: most servers require that one of the emails (sender or receiver) to be an email hosted by same server,
so make sure your email (on last line of this file) is one hosted on same server.
--------------------------- */
// read the variables form the string, (this is not needed with some servers).
$subject = $_REQUEST["subject"];
$message = $_REQUEST["message"];
$adresse = $_REQUEST["adresse"];
$sender = $_REQUEST["sender"];
// include sender IP in the message.
$full_message = $_SERVER['REMOTE_ADDR'] . "nn" . $message;
$message= $full_message;
// remove the backslashes that normally appears when entering " or '
$message = stripslashes($message);
$adresse = stripslashes($adresse);
$subject = stripslashes($subject);
$sender = stripslashes($sender);
// add a prefix in the subject line so that you know the email was sent by online form
$subject = "Contact form ". $subject;
// send the email, make sure you replace email@yourserver.com with your email address
if(isset($message) and isset($subject) and isset($sender) and isset($message)){
mail("mail@visuallab.ch", $subject, $message, $adresse, "From: $sender");
}
?>
|
hilfe bitte!! | |
| Ähnliche Beiträge zum Thema | |
|
Flashhilfe.de Flash Platform Tipps & Tutorials Flash Platform Andere Programmiersprachen Jobangebote Diskussionen
Flashhilfe News
Regeln & Bedingungen
|