Hello All,
I have used much of the resources on kirupa.com but this is my first post here. basically i am clueless. I have gone through threads, even looked at the components tutorial here, and i’m a lost as ever.
I have set a form exactly like the perfectly simple Flash based Email form using PHP tutorial but have added input fields to 8, (which was successful, i might add. Didn’t I feel like I had somewhat of a clue then). Now i wish to add two check boxes. i have tried to assign variables to the checkbox’s states with this code and now I am not getting the email. Did I depart to much from Kirupa’s tutorial with the simple on release loadVariables and onclip(data)? Is my PHP the problem? Am i assigning variables correctly to the true or false states of the checkboxes?
Thanks I’d really appreciate some help since it’s almost 1:30 AM in sweden right now!
on (release){
form = new LoadVars();
form.firma = "";
form.navn = "";
form.stilling = "";
form.adresseOne = "";
form.adresseTwo = "";
form.telefon = "";
form.email = "";
form.komentar = "";
form.jegOnsker = value;
form.kontaktMig = value;
myArray = [jegOnsker,kontaktMig];
for (var i in myArray) {
myArray*.setChangeHandler("myHandler");
}
function myHandler (component) {
value = component._name+" = "+component.getValue();
trace(value);
}
function submit() {
form.loadVariables("kontakt.php","POST");
}
}
<?
// kontakt.php
$message = "
---------------------------------
$firma,
$navn,
$stilling,
$adresse1,
$adresse2,
$telefon,
($email)
---------------------------------
kommentar: $komentar
jegOnsker: $jegOnsker
kontaktMig: $kontaktMig";
$sendTo = "mailexample@mail.com";
$subject = "website kommentar";
$headers = "From: " . $_POST["navn"];
$headers .= "<" . $_POST["email"] .">
";
$headers .= "Reply-To: " . $_POST["email"];
mail($sendTo, $subject, $message, $headers);
?>