hello all
I have a little problem, I have purchased a flash template but when i opened the mail.php
i had just one line in it. I read the instructions hoe to change the mail address to mine but there was nothing like that inside the php script.
I actually took the script from flash this is the action script for the form:
function validateEmail(strEmail)
{
return (strEmail.indexOf("@") < 2 || strEmail.lastIndexOf(".") <= strEmail.indexOf("@") + 2 || strEmail.lastIndexOf(".") > strEmail.length - 3 || strEmail.length < 8 ? (false) : (true));
} // End of the function
function clearForm()
{
new mx.transitions.Tween(txtName, “_alpha”, mx.transitions.easing.Regular.easeOut, txtMail._alpha, 0, 5.000000E-001, true);
new mx.transitions.Tween(txtMail, “_alpha”, mx.transitions.easing.Regular.easeOut, txtMail._alpha, 0, 5.000000E-001, true);
new mx.transitions.Tween(txtPhone, “_alpha”, mx.transitions.easing.Regular.easeOut, txtMail._alpha, 0, 5.000000E-001, true);
var _loc1 = new mx.transitions.Tween(txtMessage, “_alpha”, mx.transitions.easing.Regular.easeOut, txtMail._alpha, 0, 5.000000E-001, true);
_loc1.onMotionFinished = function ()
{
txtMessage.text = “Message”;
txtName.text = “Name”;
txtMail.text = “Email”;
txtPhone.text = “Phone”;
new mx.transitions.Tween(txtName, “_alpha”, mx.transitions.easing.Regular.easeOut, txtMail._alpha, 100, 5.000000E-001, true);
new mx.transitions.Tween(txtMail, “_alpha”, mx.transitions.easing.Regular.easeOut, txtMail._alpha, 100, 5.000000E-001, true);
new mx.transitions.Tween(txtPhone, “_alpha”, mx.transitions.easing.Regular.easeOut, txtMail._alpha, 100, 5.000000E-001, true);
new mx.transitions.Tween(txtMessage, “_alpha”, mx.transitions.easing.Regular.easeOut, txtMail._alpha, 100, 5.000000E-001, true);
};
} // End of the function
stop ();
mcolorx = _root.mcolorx;
new Color(_Error1).setRGB(mcolorx);
new Color(_Error2).setRGB(mcolorx);
new Color(_Error3).setRGB(mcolorx);
new Color(_Error4).setRGB(mcolorx);
btnOver = function (MC)
{
new mx.transitions.Tween(MC._txtMC, “_alpha”, normal, MC._txtMC._alpha, 50, 2.000000E-001, true);
};
btnOut = function (MC)
{
new mx.transitions.Tween(MC._txtMC, “_alpha”, normal, MC._txtMC._alpha, 100, 2.000000E-001, true);
};
_Nxt.btn.onRollOver = function ()
{
btnOver(_Nxt);
};
_Nxt.btn.onRollOut = function ()
{
btnOut(_Nxt);
};
stop ();
txtName.onSetFocus = function ()
{
if (txtName.text == “Name”)
{
txtName.text = “”;
} // end if
};
txtName.onKillFocus = function ()
{
if (txtName.text == “” || txtName.text == " ")
{
txtName.text = “Name”;
new mx.transitions.Tween(txtName, “_alpha”, mx.transitions.easing.Regular.easeOut, 0, 100, 5.000000E-001, true);
} // end if
};
txtMail.onSetFocus = function ()
{
if (txtMail.text == “Email”)
{
txtMail.text = “”;
} // end if
};
txtMail.onKillFocus = function ()
{
if (txtMail.text == “” || txtMail.text == " ")
{
txtMail.text = “Email”;
new mx.transitions.Tween(txtMail, “_alpha”, mx.transitions.easing.Regular.easeOut, 0, 100, 5.000000E-001, true);
} // end if
};
txtPhone.text = “Phone”;
txtPhone.onSetFocus = function ()
{
if (txtPhone.text == “Phone”)
{
txtPhone.text = “”;
} // end if
};
txtPhone.onKillFocus = function ()
{
if (txtPhone.text == “” || txtMessage.text == " ")
{
txtPhone.text = “Phone”;
new mx.transitions.Tween(txtPhone, “_alpha”, mx.transitions.easing.Regular.easeOut, 0, 100, 5.000000E-001, true);
} // end if
};
txtMessage.text = “Message”;
txtMessage.onSetFocus = function ()
{
if (txtMessage.text == “Message”)
{
txtMessage.text = “”;
} // end if
};
txtMessage.onKillFocus = function ()
{
if (txtMessage.text == “” || txtMessage.text == " ")
{
txtMessage.text = “Message”;
new mx.transitions.Tween(txtMessage, “_alpha”, mx.transitions.easing.Regular.easeOut, 0, 100, 5.000000E-001, true);
} // end if
};
_Nxt.btn.onRelease = function ()
{
if (txtName.text == “Name”)
{
new mx.transitions.Tween(txtName, “_alpha”, mx.transitions.easing.Regular.easeOut, 0, 100, 5.000000E-001, true);
}
else if (!validateEmail(txtMail.text))
{
new mx.transitions.Tween(txtMail, “_alpha”, mx.transitions.easing.Regular.easeOut, 0, 100, 5.000000E-001, true);
}
else if (txtPhone.text == “Phone”)
{
new mx.transitions.Tween(txtPhone, “_alpha”, mx.transitions.easing.Regular.easeOut, 0, 100, 5.000000E-001, true);
}
else if (txtMessage.text == “Message”)
{
new mx.transitions.Tween(txtMessage, “_alpha”, mx.transitions.easing.Regular.easeOut, 0, 100, 5.000000E-001, true);
}
else
{
loadVariablesNum(“MailPHP.php”, 0, “POST”);
clearForm();
clearForm();
} // end else if
};
Now the php scipt only has this line:
_root.Status=success
I am not a php programer but i found a script that might work, i am not sure thou this would be the script i found that might work:
<?php
// IMPORTANT NOTE: DO NOT change anything that has a $ before it
// Any line that has two slashes in front of it is a comment (and will be ignored by this script)
/*
// In case register globals is off (backwards compatibility)
// If you add additional input text fields - you need to add them here as well
// for example, if you add a text field with a variable “Phone”, add:
// $phone = $HTTP_POST_VARS[‘Phone’];
// Remember – you would then also need to add them in the ‘Remove Slashes’ section
// as $phone (for example), and somewhere in the ‘msg_body’ below
// I have added this example in to the script below to help give you a guide
*/
$message = $HTTP_POST_VARS[‘Message’];
$name = $HTTP_POST_VARS[‘Name’];
$email = $HTTP_POST_VARS[‘Email’];
$phone = $HTTP_POST_VARS[‘Phone’];
// Begin Censors
$message = eregi_replace(‘’, “flip”, $message);
$message = eregi_replace('’, “crap”, $message);
$message = eregi_replace(’**’, “nice lady”, $message);
$message = eregi_replace('’, “butt”, $message);
$message = eregi_replace(‘piss’, “pee”, $message);
// End Censors
// Remove Slashes Inserted by PHP
$name = stripslashes($name);
$email = stripslashes($email);
$phone = stripslashes($phone);
$message = stripslashes($message);
// Start Customizable Email Information
// Change the information in quotes below to fit your needs
$rec_email = "kmajszki@mountaincable.net"; // who do you want to send this email to
$subject = “Form From Web Page”; // this is the subject line of the email
// End Customizable Email Information
// The Body of the Email message
// You can customize the email you receive by changing the text inside the quotes below
// The code "
" (without quotes) will add a new line in the email body
// Don’t forget to add extra ‘$msg_body .=’
// for each additional input field you have added to your form
// IMPORTANT NOTE: DO NOT change anything that has a $ before it
$msg_body = "Message from $SERVER_NAME
";
$msg_body .= "*****************************************
";
$msg_body .= "Name: $name
";
$msg_body .= "E-Mail: $email
";
$msg_body .= "Phone: $phone
";
$msg_body .= "*****************************************
";
$msg_body .= "Message: $message
";
$msg_body .= "
";
$msg_body .= "
";
$msg_body .= "
";
$msg_body .= "
";
$msg_body .= "*****************************************
";
$msg_body .= "
";
$msg_body .= "Additional Sender Information
";
$msg_body .= "*****************************************
";
$msg_body .= "IP Address: $REMOTE_ADDR
";
$HostName = gethostbyaddr($_SERVER[‘REMOTE_ADDR’]);
$msg_body .= "Host: $HostName
";
$msg_body .= "User Agent: $HTTP_USER_AGENT
";
$msg_body .= "*****************************************
";
// Add Some Extra Header Information to the Mail
$header_info = “From: “.$name.” <”.$email.">";
// Now let’s take the information above and mail it to the recipient
mail($rec_email, $subject, $msg_body, $header_info);
?>
I also will attach the screen shot from flash just to be sure what are the variables because i am not sure.
I hope someone will be able to help because i have not received any emails from the people i bought the template off of in 2 weeks now. Any help would be appreciated.