Welcome To COMPEWT Bringing you video tutorials and free resources for your "compewting" endeavours. Check Out the latest Flash Tutorial.

17 February 2010

Flash Contact Form








The codes :D


------SEND BUTTON----------


on (release) {
         if (name eq "" or subject eq "" or message eq "" or email eq "") {
               stop();
         } else {
         loadVariablesNum("form.php", 0, "POST");
         gotoAndStop(2);
     }
}



--------------------------



-------CLEAR BUTTON-------------


on (release) {
    name = "";
    subject="";
    message="";
    email="";
}



---------------------------------


---------------FORM.PHP------------

$to = "your_email@email.com";
   $msg = "$name\n\n";
   $msg .= "$message\n\n";
  mail($to, $subject, $msg, "Message From: Online client\nReply-To: $email\n");
?>


--------------------------------

7 comments:

Enrique Cardozo said...

George,

First of all thank you for posting that tutorial. It was really helpful. On the video, it doesnt show how to upload the file or link the server so I could receive the emails. Can you guide me through? Thanks in advance and looking forward to hearing from you soon.

Enrique (Miami)

George Butter said...

I see, all you need to have a place to host the website, it has to be somewhere that makes used of PHP. I hope this is what you mean, sorry it has taken so long for me to get back to you.

Anonymous said...

doesn't work!

Anonymous said...

I'm trying to use this inside a movie clip and I keep getting a
TypeError: Error #1006: loadVariablesNum is not a function.
when
con_form.loadVariablesNum("form.php", 0, "POST");
runs

Balaji Web World said...

thanks for this
but mail in not coming in my id
:(

Sven said...

Thank you, George, but you forgot some things:

Replace your php with:
""

Sven said...

remove the exclamation marks in the php tags.

Post a Comment

Please keep it clean :)