Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Sep 2012
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    PHP email form help please..finish with action script

    Hi all. I have been working on a action script for a long time and finally got it working. I am totally lost of how to write my PHP email codes for when the person press submit all the information they fill in is sent to me via email could someone help me please. I found tons of example off the internet to write a basic one but nothing close to what I have. Could someone please help me. Below is my action script code I use.

    PHP Code:
    import fl.controls.*;
    import fl.controls.RadioButtonGroup;

    //This sets a group name for the radio button instances.
    var myradioGroup:RadioButtonGroup = new RadioButtonGroup("RadioButtonGroup");

    //This assigns the radio button instances to the radio group.
    cRadio1.group myradioGroup;
    cRadio2.group myradioGroup;

    submit_btn.addEventListener(MouseEvent.CLICKsubmitFunc);
    var 
    radBtns = [cRadio1,cRadio2];
    var 
    errorsNum 0;
    function 
    submitFunc(e:MouseEvent)
    {
        var 
    finalData "";
        var 
    errorFlag "Followings errors were found.\n";
        if (
    name_txt.text == "")
        {
            
    errorsNum++;
            
    errorFlag +=  errorsNum+". Enter ur name.\n";
        }
        if (
    email_txt.text == "")
        {
            
    errorsNum++;
            
    errorFlag +=  errorsNum+". Enter ur email.\n";
        }
        if (
    mobile.text == "")
        {
            
    errorsNum++;
            
    errorFlag +=  errorsNum+". Enter ur phone number.\n";
        }
        if (!
    myradioGroup.selection)
        {
            
    errorsNum++;
            
    errorFlag +=  errorsNum+". Select ur gender.\n";
        }
        
        if (
    age.selectedIndex 0)
        {
            
    errorsNum++;
            
    errorFlag +=  errorsNum+". Select any of the course.\n";
        }
        if (!
    orangecb.selected)
        {
            
    errorsNum++;
            
    errorFlag +=  errorsNum+". Please check one";
        }
        if (!
    orangelcb.selected)
        {
            
    errorsNum++;
            
    errorFlag +=  errorsNum+". Please check one";
        }
        
            if (
    message_txt.text == "")
        {
            
    errorsNum++;
            
    errorFlag +=  errorsNum+". Enter ur message.\n";
        }
        
        if (
    errorsNum 0)
        {
            
    mytxt.text errorFlag;
            
    errorFlag "";
            
    errorsNum 0;
            return 
    false;
        }

        else
        {
            
    finalData += "Thank you "+name_txt.text+" for contacting me! I will call you at "+mobile.text+", "+"else I can mail you also at "+email_txt.text+" in "+applecb.selected+"response "+orangecb.selected+" of your message "+message_txt.text+"\n\n Your other information is, you're a "+myradioGroup.selection.value+" and is between "+age.value+"\nThanks";
            
    mytxt.text finalData;
        }
    }


    Last edited by Inigoesdr; 09-28-2012 at 03:23 AM.

  • #2
    Regular Coder
    Join Date
    Sep 2002
    Posts
    456
    Thanks
    0
    Thanked 20 Times in 20 Posts
    Are you trying to convert this to php or add php email to what you have?

    Edit:
    My bad. Maybe these will help.
    How to send mail with PHP in ActionScript 3?
    Creating an Email Form with Actionscript 3.0 and PHP

    The second involves class developement.
    Hope it helps!
    Last edited by c1lonewolf; 09-27-2012 at 08:57 PM.
    NO Limits!! DHCreationStation.com
    ------------------------------------------------------------
    Broken items wanted for tinkerin'! PostItNow@BrokenEquipment.com
    Global Complaint Dept.

  • #3
    New to the CF scene
    Join Date
    Sep 2012
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi C1lonewolf, I am trying to add php email to what I have. I notice every where online when the actionscript 3.0 or webpage is made in flash a php email have to be made in dreamweaver for example. For both the flash contact form to communicate with the php email for the information to get back to me. I have truly search all over the net and found just the basic one but none with checkboxes and radio buttons. So I am lost on how to code the php email page properly.

  • #4
    Super Moderator Inigoesdr's Avatar
    Join Date
    Mar 2007
    Location
    Florida, USA
    Posts
    3,647
    Thanks
    2
    Thanked 406 Times in 398 Posts
    Unless you have a really specific need for Flash you should avoid it for forms to maximize your browser compatibility. Here are a few more examples in addition to the ones c1lonewolf that may help you:
    http://active.tutsplus.com/freebies/...orm-using-php/
    http://www.hardcode.nl/archives_9/ar...ata-in-as3.htm

  • #5
    New to the CF scene
    Join Date
    Sep 2012
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks Inigoesdr, the first link does not help me much because there are no check box or radio dial example I can study but the second link seem interested. I plan to study it to see if it is closer to see if it I can combine it with what I have vie php mail.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •