Irondragon
Threadersteller
Dabei seit: 01.12.2006
Ort: Olpe
Alter: 43
Geschlecht:
|
Verfasst Di 17.05.2011 09:12
Titel Probleme beim senden einer E-Mail aus Flash |
|
|
Hallo Leute!
Hoffe, dass mir einer von euch helfen kann. Habe mir von www.flashkit.com ein Script geladen, mit dem man aus Flash über php eine E-Mail versenden kann. Habe jetzt aber das Problem, dass die Texteingabe in dem E-Mail- bzw. Kontaktformular nicht funktioniert. Wenn ich z.B. einen Namen eingeben möchte, dann ist es so, als ob meine Tastatur nur begrenz funktionieren würde. Das heißt, dass z.B. der erste Buchstabe nicht erscheint und auch das @-Zeichen wird nicht akzeptiert. Woran könnte das liegen. Bin blutiger Anfänger, was php betrifft.
Ich poste mal hier den Code.
Flash:
Code: |
stop();
// this variable will decide if the email address is in the correct format
a =0;
// validates the email field for @ symbol and a . at the end
function validate () {
if (from.length>=7) {
if (from.indexOf("@")>0) {
if ((from.indexOf("@")+2)<from.lastIndexOf(".")) {
if (from.lastIndexOf(".")<(from.length-2)) {
a = 1;
// email is fine
}
}
}
}
}
// checks for empty fields then calls email check function
function formcheck () {
validate ();
trace(a);
if (fname = "" or company eq "" or telno eq "" or comments eq "" or from eq "") {
stop();
error = "Sie haben nicht alle Felder ausgefüllt. Bitte füllen Sie alle Felder aus";
} else {
emailcheck ();
}
}
// email check function calls the fucntion at the top, if its satisfied it loads the php script and sends you to frame 2
function emailcheck (){
if (a != 1){
stop();
error = "E-Mail-Adresse ist nicht korrekt";
} else {
loadVariablesNum("mail.php3", 0, "POST");
gotoAndStop(2);
}
}
|
PHP:
Code: |
<?php
#change the email address in the variable $adminaddress below to the email address you want
#the form to send to.
$adminaddress = "info@fingermark-design.de";
$sitename = "www.fingermark-design.de";
#make sure your input field variable names in flash are the same as the field names below,
#leave out the dollar sign in flash.
mail("$adminaddress","Info Request",
"A customer at $sitename has made the following enquiry\n
First Name: $fname
Company Name: $company
Telephone: $telno
Email: $from\n
The visitor commented:
-----------------------------------------------------------------------------------------
$comments
Logged Info :
-----------------------------------------------------------------------------------------
Using: $HTTP_USER_AGENT
Hostname: $ip
IP address: $REMOTE_ADDR
Date/Time: $date","FROM:$adminaddress");
?>
|
Erhalte zwar eine E-Mail, aber steht nichts drin.
Wäre super dankbar für eure Hilfe
Zuletzt bearbeitet von phihochzwei am Di 17.05.2011 09:25, insgesamt 1-mal bearbeitet
|
|