Hi I have very limited knowledge and have a template for a site that I liked. I have enough knowledge to get the site up and running, but I cannot get the flash/php form to send me e-mail when I test it. My server is running PHP 5.2.5 and everything seems to be set up properly but I don’t know. Like most providers, the company has crap customer service.
Can anyone help? I’m pretty desperate!!!
Thank you in advance!!!
Chris
Here is my flash script:
label1 = “Name”;
label2 = “Company”;
label3 = “Phone”;
label4 = “E-mail”;
label5 = “Subject”;
label6 = “Message”;
//
countField = 6;
clearField();
//
var arrayLabel:Array = new Array();
for (i=1; i<countField+1; i++) {
txtField = this[“txtField”+i];
txtField.index = i;
arrayLabel* = this[“label”+i];
txtField.tabIndex = i;
txtField.onSetFocus = function() {
if (this.text == arrayLabel[this.index]) {
this.text = “”;
}
};
txtField.onKillFocus = function() {
if (this.text == “”) {
this.text = arrayLabel[this.index];
}
};
}
//
function clearField() {
txtField1.text = label1;
txtField2.text = label2;
txtField3.text = label3;
txtField4.text = label4;
txtField5.text = label5;
txtField6.text = label6;
}
//
// button CLEAR
btnClear.onRollOver = function() {
this.gotoAndPlay(“over”);
};
btnClear.onRollOut = btnClear.onReleaseOutside=function () {
this.gotoAndPlay(“out”);
};
btnClear.onRelease = function() {
clearField();
};
//
// button SEND
btnSubmit.onRollOver = function() {
this.gotoAndPlay(“over”);
};
btnSubmit.onRollOut = btnSubmit.onReleaseOutside=function () {
this.gotoAndPlay(“out”);
};
btnSubmit.onRelease = function() {
if (_root.pages.page2.contactForm.txtField1.text == label1 ||
_root.pages.page2.contactForm.txtField2.text == label2 ||
_root.pages.page2.contactForm.txtField3.text == label3 ||
_root.pages.page2.contactForm.txtField4.text == label4 ||
_root.pages.page2.contactForm.txtField5.text == label5 ||
_root.pages.page2.contactForm.txtField6.text == label6) {
gotoAndStop(3);
} else {
_root.contactform.loadVariables(“email.php”, “POST”);
gotoAndStop(2);
}
};
stop();
and here is my email.php file
<?php
$sendTo=“chrisbendet@yahoo.com”;
$name=$_POST[‘name1’];
$email=$_POST[‘email’];
$company=$_POST[‘company’];
$from = ‘you@somedomain.com’;
$phone=$_POST[‘number’];
$subject=$_POST[‘subject’];
$mes=$_POST[‘message1’];
$header="From: $from
";
$mes="Name: $name
Company: $company
Email: $email
Phone: $phone
Subject: $subject
Comments: $mes
";
mail($sendTo,$subject,$mes,$header);
?>