Jump to content


Photo

Please help with form!


  • Please log in to reply
No replies to this topic

#1 rosanna

rosanna

    Young Padawan

  • Members
  • Pip
  • 2 posts

Posted 17 February 2007 - 12:34 PM

I have created a form using a tutorial. Once I completed the form I uploaded it and in my email I get the part that says name, address, phone....but I don't get all the info. where the user types in their information. I'm thinking this has to do with the php form or the coding in the actions layer which is the submit button but I am not sure.

I need someone to take a look at it. If it makes it easier I can send the actual flash file and the php. Thank you!


Here is what I have for the php:

<?
//Destination Email ID
$to = "[email protected]";

//Date of Class
$datenew = $_GET['date'];

//Name of the Person
$namenew = $_GET['name'];

//License of the Person
$licensenew = $_GET['license'];

//Phone of the Person
$phonenew = $_GET['phone'];

//Email Id of the person
$emailnew = $_GET['email'];

//Mailing of the Person
$mailingnew = $_GET['mailing'];

//Feedback detail
$hownew = $_GET['how'];

//Subject line of the email
$subject = "Feedback Form"." "."$emailnew";

/*********** Email body *******************/
$matter = "Below are the details filled by"." "."$namenew"."\n\n".
"Date:"." "."$datenew"."\n\n".
"Name:"." "."$namenew"."\n\n".
"License:"." "."$licensenew"."\n\n".
"Phone:"." "."$phonenew"."\n\n".
"Email:"." "."$emailnew"."\n\n".
"Mailing:"." "."$mailingnew"."\n\n".
"how:"." "."$hownew"."\n\n";
/**********************************************/


mail("$to", "$subject","$matter","From: $emailnew");

?>


This is the code for the actions layer:

stop();

// Making the default setting for below mentioned textfield variables

Date = "";
name = "";
license = "";
phone = "";
email = "";
mailing = "";
how = "";
//
//-------------------------------------------------------
// Submit Button action
submit.onRelease = function() {
//
//Add Path of the php file
feedbackpath = "mailto.php";
//
str1 = email.indexOf("@");
str2 = email.indexOf("@")+1;
str3 = email.charAt(str1+1);
str4 = email.lastIndexOf(".");
str5 = email.charAt(str4+1);
len = length(email);
counter = 1;
flag = 0;
while (Number(counter)<=Number(len)) {
Char = substring(email, counter, 1);
if (Char ne "@") {
flag = Number(flag)+1;
}
counter = Number(counter)+1;
}
//
//Date field validation
if (date == "") {
condition1 = "";
datemark._visible = true;
} else {
condition1 = "ok";
datemark._visible = false;
}
//Name field validation
if (name == "") {
condition2 = "";
namemark._visible = true;
} else {
condition2 = "ok";
namemark._visible = false;
}
//License field validation
if (license == "") {
condition3 = "";
licensemark._visible = true;
} else {
condition3 = "ok";
licensemark._visible = false;
}
//Phone field validation
if (phone == "") {
condition4 = "";
phonemark._visible = true;
} else {
condition4 = "ok";
phonemark._visible = false;
}
//E-Mail Address validation
if (str4<=str2 || str3 =="." || str5 =="" || Number(flag) != Number(len-1)) {
condition5 = "";
emailmark._visible = true;
} else {
condition5 = "ok";
emailmark._visible = false;
}
//Mailing field validation
if (mailing == "") {
condition6 = "";
mailingmark._visible = true;
} else {
condition6 = "ok";
mailingmark._visible = false;
}
//Suggestion field validation
if (how == "") {
condition7 = "";
howmark._visible = true;
} else {
condition7 = "ok";
howmark._visible = false;
}
//Sending data to php file only if all the above validations are fulfilled
if (condition1 == "ok" && condition2 == "ok" && condition3 == "ok" && condition4 == "ok" && condition5 == "ok" && condition6 == "ok" && condition7 == "ok") {
loadVariablesNum(feedbackpath+
"?name="+name+"&email="+email+"&feedback="+suggestion, 0);
gotoAndStop(2);
}
};


I took out the last part it's just the reset button and (*) mark coding.
And this is what I get in my email:

Below are the details filled by Rosanna
Date:
Name: Rosanna Guillot
License:
Phone:
Email: [email protected]
Mailing:
how:




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users