since musicman is helping currently with email and php..
wanna take a look at mine? still no work as the other guy said
Code:
var sendData_lv:LoadVars = new LoadVars();
var receiveData_lv:LoadVars = new LoadVars();
var formValidated:Boolean;
var errorMessages:Array = new Array();
receiveData_lv.onLoad = function():Void{
trace(this.sent);
if(this.sent == "OK"){
message0_txt.text = "Thank you for your Request, I will be intouch with you shortly";
}else{
message0_txt.text = this.sent;
}
}
creditapp_btn.onRelease = function() {
//this clears the error text field if they have been populate previously
clearTextFields();
errorMessages.length = 0; //empty the array so next time the submit button is clicked the array is not already populated
formValidated = checkForm();
if (formValidated) {
//the form is valid and so now we can send details to our PHP file
//populate LoadVars object with the field values
sendData_lv.name = t1.text;
sendData_lv.name = t2.text;
sendData_lv.name = t3.text;
sendData_lv.request = t4.text;
//trace(sendData_lv.email);
//trace("valid");
sendData_lv.sendAndLoad("email1.php?ck="+new Date().getTime(), receiveData_lv);
} else {
//populate textfields with the error messages
for (var i = 0; i<errorMessages.length; i++) {
_root["message"+i+"_txt"].text = errorMessages[i];
trace(errorMessages[i]);
}
}
};
function checkForm():Boolean {
//check whether the name field is empty
if (t1.text == "") {
errorMessages.push("Please enter your name.");
}
if (t2.text == "") {
errorMessages.push("Please enter your middle name.");
}
if (t3.text == "") {
errorMessages.push("Please enter your last name");
}
//if at this point the array is empty i.e has length 0, then this in effect means the form has passed all checks
if (errorMessages.length == 0) {
return true;
} else {
return false;
}
PHP Code:
<?php
$firstname = $_POST['t1'];
$middlename = $_POST['t2'];
$lastname = $_POST['t3'];
$birthdate = $_POST['birthdate_txt'];
$subject = 'Request from your website';
$headers = "From: $name <$email>\n";
$headers .= "Reply-To: $name <$email>\n";
//ENTER YOUR EMAIL ADDRESS HERE
$to = '[email protected]';
//---------------------------
$success = mail($to, $subject, $request, $headers);
if($success){
echo '&sent=OK';
}else{
echo '&sent=Error';
}
?>
www.parkagencywest.com
i need this to work in 2 sections, 1 under financing and 1 under contacts where the request form is. youll see in the financing secition ive gotten as far as having your default mail client pop up when clicking "send" but its a blank email i get...
musicman, if youre able to fix this i'll pay you the 50 bucks that i currently have offered in my other post. this is very important to me and im not a flash designer, just someone who fools with it and always wants to bite off more than i can chew