This is a discussion on "Radio Buttons data through email" within the Flash & Multimedia Forum section. This forum, and the thread "Radio Buttons data through email are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
Radio Buttons data through email
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
Radio Buttons data through email
I have to textinput field and 4 radiogroups, I can not get this information to send to my email address, can someone please help me before I jump?
Actionsript: // create load vars object. this is what you use to send the data to php page. var rsvpInfo:LoadVars = new LoadVars(); // optional user feedback letting them know if the email was sent successfully. /*rsvpInfo.onLoad = function( loadSuccessful:Boolean ) { if ( loadSuccessful ) { txtUserMessage.text = rsvpInfo.thanksMessage; } else { txtUserMessage.text = "Error connecting to server."; } }; */ // create button component listener (listens for the button 'click' event) var submitListener:Object = new Object(); submitListener.click = function() { // set up vars to send to the php page // guest names rsvpInfo.guest1 = txtGuest1.text; rsvpInfo.guest2 = txtGuest2.text; rsvpInfo.guest3 = txtGuest3.text; rsvpInfo.guest4 = txtGuest4.text; // guest food rsvpInfo.guest1meal = guest1meal.selection.data; rsvpInfo.guest2meal = guest2meal.selection.data; rsvpInfo.guest3meal = guest3meal.selection.data; rsvpInfo.guest4meal = guest4meal.selection.data; // main guest email address rsvpInfo.emailAddress = txtRsvpEmail.text; // send the stuff to the php page. rsvpInfo.sendAndLoad( "rsvp.php" , rsvpInfo, "POST" ); }; // register 'click' event listener. submit.addEventListener( "click", submitListener ); php: <?PHP $to = "email address here"; $subject = "RSVP Confirmation & Dinner Reservations"; $message = "Name: " . $guest1; $message .= "\nEmail: " . $emailAddress; $message .= "Main Guest Name: " . $guest1 . "\r\n"; $message .= "Main Guest Dinner: " . $guest1meal . "\r\n\r\n"; $message .= "Addtional Guest 1 Name: " . $guest2 . "\r\n"; $message .= "Addtional Guest 1 Dinner: " . $guest2meal . "\r\n\r\n"; $message .= "Addtional Guest 2 Name: " . $guest3 . "\r\n"; $message .= "Addtional Guest 2 Dinner: " . $guest3meal . "\r\n\r\n"; $message .= "Addtional Guest 3 Name: " . $guest4 . "\r\n"; $message .= "Addtional Guest 3 Dinner: " . $guest4meal; $headers = "From: $emailAddress"; $headers .= "\nReply-To: $emailAddress"; mail($to,&subject,$message,$headers); ?> |
|
|
![]() |
| Tags |
| radio, buttons, data, through, email |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [SOLVED] Help with Radio buttons | Oak | JavaScript Forum | 17 | Feb 2nd, 2008 09:44 |
| Radio Buttons and Javascript | activeware | JavaScript Forum | 6 | Dec 11th, 2007 18:02 |
| How do i submit a form with radio buttons ? | Accurax | Web Page Design | 5 | May 12th, 2007 18:34 |
| help with pagination and html radio buttons | AdRock | PHP Forum | 5 | Jul 27th, 2006 12:10 |
| Radio Buttons | redhead | Web Page Design | 2 | Apr 12th, 2004 19:00 |