Sending Email with PHP Tutorial

I just uploaded a new tutorial at http://www.gotoandlearn.com called “Sending Email with PHP” which shows how to email information from Flash using PHP. In the tutorial I build a simple contact form and then use the LoadVars class to send and load information to the PHP script.

Lee


Commentary

  1. I became addicted to this site! this is toxic man!!!
    congrats agains!

  2. Phil says:

    Very useful !!!thanks so much Lee …….

  3. Terje says:

    Great tutorial Lee!
    Like Carlos I’m also addicted to your tutorials :)
    But why wont the swf work when lanched locally. I only get it to work when I upload and run the swf from the server. What if I want to run this from i.e. a swf on a CD?

    Thanks anyway, Lee! I had great use for this tutorial!

  4. xGrill says:

    ITS DOWN NOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO

  5. Boris says:

    What’s has happened at gotoandlearn.com. The Frame is loaded, but the single tutorial doesn’t load.

  6. Hello… Plis, i’ will try explain in english:
    How i put CSS CODES to change the font, the background… that sttuf’s…
    I Hope you understand!!

    Sorry my poor english!!
    Bye!!

  7. PONYACK says:

    yes this is a great tutorial but it needs to be updated because the PHP script does not work on all servers. I had to modify the script by adding the $_POST….otherwise GOTOAND LEARN ROCKS…hope he doesn’t start charging for his services

  8. Ola says:

    Doesn’t work for me. I’ve tried on two different servers and the mail gets returned empty. Anything to do with what you mentioned PONYACK?

  9. Where does the $_POST go in the PHP script????????

    HEEEELLLLP!!!!!!!

  10. Lee Brimelow says:

    $message = “Name: ” . $_POST['theName'];
    $message .= “\nEmail: ” . $_POST['theEmail'];
    $message .= “\n\nMessage: ” . $_POST['theMessage'];

  11. mswallace says:

    This works great. What a simple solution for a flash contact form. A quick note. If you are going to make a form like this but you are putting it with in a symbol that is masked you need the text areas to be plain old text imput areas and then on top of that you need to embed the fonts for these areas. go here http://bluethreadonline.com/mswallace/main.html
    and click on the contact area. This form was created using this tutorial. If that URL is broken then that means my new site is up. Check it out at http://mswallace.com

    Thanks and keep up the great work at http://gotoandlearn.com

    Matthew

    PS if any of you would like more info on embeding the fonts, like I was saying above, just shoot me a quick email. You can reach me at either http://bluethreadonline.com or http://mswallace.com

  12. Garret says:

    Lee,

    The tutorial worked GREAT! My client, however, wants the server side script to be ASP rather than PHP.

    Can anyone give me some direction as to a converter.

    Here is my code.

  13. Dwayne Neckles says:

    Where is this tutorial on the website?

  14. ron says:

    hi
    love the site but cannot find this tutorial there.

  15. Hi,
    I cannot find the tutorial…Can someone give me the link ?
    Very good site specialy for flash newby ;)
    thanks

  16. Donny says:

    Still looking around for this tutorial. Does anyone know where I can locate it?

  17. miguel says:

    where is the tutorial???? in gotoandlearn no

  18. robert says:

    I’ve learned alot from this site, thank you, but where’s the tutorial to do the contact form thanks.

  19. Tariq says:

    i am facing Problem when am doing , sending Emaial THrough php , the system gives an error i dont know how to handel it , so if you could help me please .
    am writing down the error which i recieved from ma Php Page
    (( Warning: mail() [function.mail]: Failed to connect to mailserver at “localhost” port 25, verify your “SMTP” and “smtp_port” setting in php.ini or use ini_set() in C:\Program Files\xampp\htdocs\2nd\Contact.php on line 136))
    and this is wot i hve done in line num 136 >>>
    (( mail(“mohamad.tariq@hotmail.com”,”Feedback form”,$msg,$mailheaders); ))

    Ill be looking forword for your Reply soon

  20. Lee, Thanks for everything! Where can I find this beautiful tutorial?

  21. Serge says:

    I did this tutorial a while back. I can’t find my .fla and the tutorial is not posted. Lee, can you send me the tutorial or post it back on your site. Thanks!!

  22. Rehana says:

    does anyone know where i can get this tutorial from? cant seem to find it…

  23. Sanumi says:

    I’ve tried this but I don’t got any of the messages.Flash said message sent but messnage is not recived why?

  24. Joel says:

    Good tutorial but how come when ever i click on send when it goes to my email address as blank text even the header is blank?

  25. Sergio says:

    It’s pretty nice!

    I’d like to know how can I get the sentOk when I’m loading the email.swf in a main movie. I’ve used if(this.sentOk) and if(_root.sentOk), but doen’t works. So, I’m not recieving any feedback.

  26. Sergio says:

    Solved:

    receiveLoad.onLoad = function() {
    if(this.sentOk) {
    gotoAndStop(“success”);
    }
    else {
    gotoAndStop(“failed”);
    }
    }

  27. Bonita says:

    Hi there! I am very much a beginner at Flash, and after completing my first site, the only problem I have is the scripting for the contact form. The site will be launched on an ASP.net server and I have no clue where to find help!
    I have successfully created the form to show an error message and a thank you message – its just the scripting to send the info to an email?

    Would really appreciate the advice …please!

  28. Andrew says:

    I cannot get this to work. It sent an email with no content before I put in the $_POST and now I get nothing. What is wrong with this script?

  29. Thomas says:

    The correct PHP script is as follows:

    It works 100%.

  30. Ben says:

    I think some of the PHP on this tutorial is out of date. The ‘point’ referred to in the tutorial is no longer valid, so I can’t get this to work at all.

    Any help please?

    Thanks

  31. sagar says:

    i cant send datas frm my comtact page

  32. Ricky says:

    This is nice. Although php is not working on all the servers. I found another as3 contact us form flash tutorial and code source if someone wants give it a try

    http://www.msinghinteractive.com/blog/tag/as3-contact-us-form-flash-tutorial/

    Cheers
    R

  33. Iena says:

    Hello Lee,

    http://www.gotoandlearn.com is great, nice tuturials, but I don’t get it working, not the video version (got an email without de data) and not with
    $message = “Name: ” . $_POST['theName'];
    $message .= “\nEmail: ” . $_POST['theEmail'];
    $message .= “\n\nMessage: ” . $_POST['theMessage'];

    NOW I GET NOTHING AT ALL,

    flash CS3 and PHP5
    and there seems to be a problem with the your mail was sent succesfull or your mail failed to be sent.

    what to do??
    love from Holland
    Iena

  34. max says:

    Hi Lee
    Thanks for the very clean tutorial.

    I have a similar problem to Lena, With the code below I receive the email but without the data.

    I am using Easyspace as my host and so have to include the code:
    $SendEmail =”enquiry@walnutwalnut.com”;
    and
    ‘-f’.$SendEmail

    When I add your extra code below I get no email at all and the “Message Failed” text in the flash file.
    $message = “Name: ” . $_POST['theName'];
    $message .= “\nEmail: ” . $_POST['theEmail'];
    $message .= “\n\nMessage: ” . $_POST['theMessage'];

    Easyspace: PHP Version 5.1.6
    Linux server

    Thank you I hope this is an easy fix.
    Max

Leave a Comment