Sending a form through flash

I am trying to create a newsletter request box. I need it to take an email address that a user inputs then send it to our company email address. I also want there to be some sort of message that shows that the message has been sent

Thanks
eli290Asked:
Who is Participating?
 
Aneesh ChopraConnect With a Mentor Commented:
source files used in above tutorial are also available here:
http://www.kirupa.com/developer/actionscript/fla/Kirupa_flash_php_email.zip
0
 
Aneesh ChopraCommented:
Hi,

here is what exactly you want

Flash Based Email Form Using PHP
http://www.kirupa.com/developer/actionscript/flash_php_email.htm

Rgds
Aneesh
0
Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

 
eli290Author Commented:
Where does the php file have to be put?
0
 
Aneesh ChopraCommented:
on your server,

if you have installed apache server on your local machine, you can copy it in www. folder for testing

do remember to provide the updated path to flash swf.
0
 
eli290Author Commented:
I know on the server but which folder? Currently I have my html page directly in the public_html and i have the swf in a sub folder called flash
0
 
Aneesh ChopraCommented:
if your server support php, you can place it anywhere inside public_html..

just update the path according inside swf
and IMPORTANT: use relative path inside swf
0
 
eli290Author Commented:
Sorry I lost you, where do i set the relative path inside swf
0
 
Aneesh ChopraCommented:
I suggest you just, place php file in the same folder where swf resides..

and use the php name simply as "myphpfile.php"
0
 
eli290Author Commented:
If at all possible could you look at my source file for it? It is located at www.ctxworld.com/form

Thanks
0
 
Aneesh ChopraCommented:
ok,

1. just place form.php in the same folder where swf will be.
2. textField should be in the same movieClip where button reside, currently textField inside a movieClip.. just select movieClip "email" and press CTRL+B, now you will have button and textField both in same level

3. now assign a variable name to textField.. (not instance name, assign variable name)
select the textField, and Just look for "Var:" in properties panel

rest I hope, php side you know how to handle it.
0
 
Tony_GoodmanCommented:
You could call a .asp file from flash.  In flash, call the file like this:
getURL('Http://www.email.asp');

In you email.asp file, this would be the code:


<%@ LANGUAGE="VBScript"%>
<%Response.Buffer=True%>
<%
'Send email
      Dim objCDO
    Set objCDO = Server.CreateObject("CDONTS.NewMail")
      objCDO.To = "Tony.Goodman@wpafb.af.mil;Tony.Goodman@wpafb.af.mil"
      objCDO.From = Request("Email")
    objCDO.Subject = "IRIS Feedback submitted"
      objCDO.Body = Request("Name") + " submitted the following information:" + space(75) + "Phone: " + Request("Phone") + space(75) + " " + space(75) + Request("Comments")
      objCDO.Send
      Set objCDO = Nothing%>



Hope this helps,
-Tony
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.