Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 09-27-2012, 02:23 PM   PM User | #1
vanessia1999
New to the CF scene

 
Join Date: Sep 2012
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
vanessia1999 is an unknown quantity at this point
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..
vanessia1999 is offline   Reply With Quote
Old 09-27-2012, 08:41 PM   PM User | #2
c1lonewolf
Regular Coder

 
Join Date: Sep 2002
Posts: 230
Thanks: 0
Thanked 11 Times in 11 Posts
c1lonewolf is an unknown quantity at this point
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!
__________________
NO Limits!!

Last edited by c1lonewolf; 09-27-2012 at 08:57 PM..
c1lonewolf is offline   Reply With Quote
Old 09-28-2012, 12:20 AM   PM User | #3
vanessia1999
New to the CF scene

 
Join Date: Sep 2012
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
vanessia1999 is an unknown quantity at this point
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.
vanessia1999 is offline   Reply With Quote
Old 09-28-2012, 03:28 AM   PM User | #4
Inigoesdr
Super Moderator


 
Inigoesdr's Avatar
 
Join Date: Mar 2007
Location: Florida, USA
Posts: 3,604
Thanks: 2
Thanked 399 Times in 392 Posts
Inigoesdr is a jewel in the roughInigoesdr is a jewel in the roughInigoesdr is a jewel in the rough
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
Inigoesdr is offline   Reply With Quote
Old 09-28-2012, 08:04 PM   PM User | #5
vanessia1999
New to the CF scene

 
Join Date: Sep 2012
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
vanessia1999 is an unknown quantity at this point
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.
vanessia1999 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:32 AM.


Advertisement
Log in to turn off these ads.