I need a php form for my site. I've found a perfect form to add to my main .swf
for my site.
I've downloaded it from flashkit.com, below is the the file
http://www.flashkit.com/movies/Utilities/Other/PHP_Mail-henry-4983/index.php now, the zip file contains two files, the .swf and the .fla
I've opened the .fla in flash to see the contents and how it is contructed in
flash. The code below is in the actions for the first frame of the actions
layers. I understand that all this code is executed when I hit the send button.
My question is, what files do I need to modify ,within the code below, to work
for my site???? What else do I need?
fscommand ("allowscale", "false");
//
// set some variables
//
mailform = "mailform.php";
confirm = "please wait for confirmation ..."
action = "send";
//
// and focus on variable fname
//
Selection.setFocus("fname");
//
// validate email function
//
function validate (address) {
if (address.length>=7) {
if (address.indexOf("@")>0) {
if ((address.indexOf("@")+2)<address.lastIndexOf(".")) {
if (address.lastIndexOf(".")<(address.length-2)) {
return (true);
}
}
}
}
return (false);
}
//
//form check
//
function formcheck () {
if ((((email == null)) || (email.length<1)) || (email == "ERROR! Address not
valid")) {
email = "ERROR! Address not valid";
action = "";
}
if (!validate(email)) {
email = "ERROR! Address not valid";
action = "";
}
if (fname == null) {
fname = "ERROR! Name required";
action = "";
}
if (lname == null) {
lname = "ERROR! Name required";
action = "";
}
if ((validate(email)) && (email != "ERROR!") && (fname != "") && (lname !=
"")) {
action = "send";
loadVariablesNum (mailform, 0, "POST");
gotoAndPlay ("wait");
}
}
stop ();