Link to home
Start Free TrialLog in
Avatar of eli290
eli290

asked on

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
Avatar of ddlam
ddlam
Flag of Hong Kong image

Avatar of Aneesh Chopra
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
ASKER CERTIFIED SOLUTION
Avatar of Aneesh Chopra
Aneesh Chopra
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of eli290
eli290

ASKER

Where does the php file have to be put?
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.
Avatar of eli290

ASKER

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
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
Avatar of eli290

ASKER

Sorry I lost you, where do i set the relative path inside swf
I suggest you just, place php file in the same folder where swf resides..

and use the php name simply as "myphpfile.php"
Avatar of eli290

ASKER

If at all possible could you look at my source file for it? It is located at www.ctxworld.com/form

Thanks
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.
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