GoDaddy PHP Flash Contact Form Woes...
Hello!
I hope someone can help me.
I also having terrible problems getting my Mailing List Subscription form to work on my Flash Site. I'm also with Godaddy and they have basically been zero help so far. I'm using CS3 and AS 2.0.
My form just has 2 fields for name and email and then a submit button. The strange thing is that the way I have it now, I am able to receive the subscription emails if I test it locally from within Flash. But, as soon as I upload it to Godaddy it stops working! What's up with that?
However, even though when I test it from within Flash and receive the email, the "success" or "failed" response part still doesn't work for my form.
I've spent so many hours on this... Please help!
Here's my PHP:
<?PHP
ini_set('SMTP', 'relay-hosting.secureserver.net');
$theName = $_POST['theName'];
$theEmail = $_POST['theEmail'];
$to = '[email protected]' . ', ';
$subject = "Newsletter Subscription";
$message = "Name: " .$theName;
$message .= PHP_EOL . PHP_EOL ."Email: $theEmail";
$headers = "From: $theEmail";
$headers .= "\rReply-To: $theEmail";
$sentOk = mail($to,$subject,$message,$headers);
echo "sentOk=" . $sentOk;
?>
and here's my AS 2:
stop();
var senderLoad:LoadVars = new LoadVars();
var receiveLoad:LoadVars = new LoadVars();
sender.onRelease = function() {
senderLoad.theName = theName.text;
senderLoad.theEmail = theEmail.text;
senderLoad.sendAndLoad("http://www.website.com/send.php",receiveLoad, "POST");
receiveLoad.onLoad = function() {
if(this.sentOk) {
_root.gotoAndStop("success");
else {
_root.gotoAndStop("failed");
theName.tabIndex = 1;
theEmail.tabIndex = 2;
Actaully is i got this Action script from a tutorial and i learnt from it but the mail.php was not part of the tutorial.
Would you be able to provide me a php script based on the instances names i mention above?
Similar Messages
-
Hi my flash contact form will only accept certain keys, Like zxvywghjk.. and number keys will not type into it any ideas???
motionstills.co.ukForms in Flash use Input text objects. You have to embed the font or fonts that you want to use for those text objects. It sounds like either you embedded a font that doesn't contain a full set of glyphs or that a restricted set of glyphs was set in the Font Embed window.
-
Using PHP with Flash (contact form)
I am trying to get a contact form on a flash site to work and
for some reason the PHP isn't forwarding the message to my email.
Below is the flash code I have used as well as the document I have
saved as contact.php. Thank you so much for the help. This is the
last thing I need to complete for the site and I just can't seem to
get it right. Thanks.
Flash Code For the Submit Button:
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (this._currentframe<this._totalframes) {
this.nextFrame();
} else {
if (this._currentframe>1) {
this.prevFrame();
on (release) {
this._parent.getURL ("contact.php","_blank","GET");
this._parent.name = "Your Name:";
this._parent.email = "Your Email:";
this._parent.phone = "Your Phone Number:";
this._parent.text4 = "e-mail:";
this._parent.message = "Your Message:";
Here is what I have for Contact.php:
<?php
$your_name = $_GET['name'];
$your_email = $_GET['email'];
$your_phone = $_GET['phone'];
$your_message = $_GET['message'];
$recipient_email = "[email protected]";
$subject = "from " . $your_email;
$headers = "From: " . $your_name . "<" . $your_email .
">\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1';
$content = "<html><head><title>Contact
letter</title></head><body><br>";
$content .= "Name: <b>" . $your_name .
"</b><br>";
$content .= "E-mail: <b>" . $your_email .
"</b><br><hr><br>";
$content .= "Phone: <b>" . $your_phone .
"</b><br>";
$content .= $your_message;
$content .= "<br></body></html>";
mail($recipient,$subject,$content,$headers);
?>
<html>
<body bgcolor="#282E2C">
<div align="center"
style="margin-top:60px;color:#FFFFFF;font-size:11px;font-family:Tahoma;font-weight:bold">
Your message was sent. Thank you.
</div>
</body>
</html>
<script>resizeTo(300, 300)</script>well...that's true..I wanted "name" to be cleared when
clicked...this version I found doesn't clear "name" when clicked,
but it needs selected and erased manually...anyway..it's better
then nothing...
Reason I want this is because I'm using a design that is not
giving me much space and I have to trick the low space with this
option.
If you want I can send you the fla to get a better
picture...I believe you deserve it :) -
Flash Contact form with Php Error
Hi again (".)
I've making this contact form on flash & i got the script for the action script but i'm unable to integrate a php script that would send the mail from my form.
I'm using two input feilds with instance names as theEmail and theMessage
Would relly appreciate it if i culd get some help on it. thank you so much.
Here is the action action script code i'm using -
snd_btn.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler);
function fl_MouseClickHandler(event:MouseEvent):void
if (theEmail.text == "" || theMessage.text == "")
theFeedback.text = "Please fill in all fields.";
else
// create a variable container
var allVars:URLVariables = new URLVariables();
allVars.email = theEmail.text;
allVars.message = theMessage.text;
//send info to a URL
var mailAddress:URLRequest = new URLRequest("mail.php");
mailAddress.data = allVars;
mailAddress.method = URLRequestMethod.POST;
sendToURL(mailAddress);
theFeedback.text = "Thank You!";
theEmail.text = "";
theMessage.text = "";Actaully is i got this Action script from a tutorial and i learnt from it but the mail.php was not part of the tutorial.
Would you be able to provide me a php script based on the instances names i mention above? -
PHP files and Flash contact form
Hello,
I am creating a website in flash CS4 and I made a contact form and when I test the site out, I can type and click the submit button, so everything is fine there but it doesn't go to anything. Now I know I need a code to tell the contact form where to go, but I can't find one that works, or I may be doing something wrong. I also have been reading about PHP but I am not sure what that is. I found a site that said to put this code in the actions panel.
on(release){
getURL("http://www.mail.menaceaudio.com", "", "POST");
The www.mail.menaceaudio.com is the site for the companies email.
So when I test it out this error comes up:
1087: Syntax error: extra characters found after end of program.The code you show is AS2, not AS3. Try searching for 'as3 form php' and you should find plenty of info.
PHP is a server-side scripting language. You put PHP files on your server and can then call them from Flash... -
Hello every one.
I wonder if anyone have worked with CAPTCHA in contact form, it's will be great for anty spam. If some one have a template or a solution for this please write here or PM
Kind regards,
Alexeihttp://www.google.com/search?hl=en&source=hp&q=flex+captcha&meta=&aq=f&oq=
http://www.google.com/search?hl=en&q=flash+captcha&aq=f&oq=&aqi=g1g-m1 -
Flash Contact form for beginner
Hello,
I have been searching online for a tutorial to create a contact form on my flash website. I am using Flash CS3 and ActionScript 3. I am not fluent in ActionScript. I was looking to copy and paste the code and change the information to my own. Any help would be really appreciated.You should be able to find a number of tutorials if you search Google using "AS3 contact form tutorial"
https://www.google.com/search?q=AS3+contact+form+tutorial -
Is SWFOBject messing up my Flash/PHP 'contact form'?
Hi all,
First post, and first project using Flash!
Here's the
page I'm having problems with...
It's an email contact page that uses a Flash contact form
that I purchased from iStockphoto. The swf uses a PHP script that I
keep in the same location on my server as the swf. The PHP sends
the email to my specified address. In theory that should work fine,
but in the interests of keeping things working across browsers, and
maintaining my Validation, I've been calling the swf using
SWFObject.
However, something is screwed up. When I click on 'Send' on
the successfully embedded Flash form, nothing happens. Neither my
hosting providers nor the author of the flash have been able to
work out why - although they both agree that SWFObject may have
something to do with it.
Please bear in mind that I'm REALLY new to Flash, although
I'm by no means a technonewbie - tell me what I'm looking for and
what to change and I can keep up, but someone posted the following
on another forum I frequent and I have no idea what it means:
quote:
Submitting a form relies on either a post or get method,
maybe SWFObject needs specific configuration to do this. If it
doesn't support either of those two methods you may need to use an
interim piece of javascript or something to accept the form
variables then call your sendmail.
Help much appreciated!
Owenkglad,
The actionscript calls the PHP form but dosen't post any information, it loads in the browser and I get the email but nothing in it?
I'm just looking for the correct Actionscript to paste into flash and hopefully get it working. Thanks for the help. -
I NEED HELP! Making a flash email form using php.
Hi, my name is Sean, I'm making a flash contact form using php for a website.
I'm having a hard time with the php. Can some one help?
Click here to download my source.Satellite A505-S6005
ACPI Flash BIOS version 1.40 for Satellite A500/A505 (PSAT6U/PSAT9U)
When you execute the download file (sat6v140.exe) it decompresses into several files in the sat6v140 folder.
Among those, is the readme.txt attached, which explains how to create the CD.
Burn a CD or DVD from an ISO file
-Jerry
Attachments:
readme.txt 14 KB -
I have been looking everywhere on how to code a contact form with as3
I wouldn't think it is such an uncommon thing, but I have been unable to find tutorials past flash 5, or as2, on how to code contact forms.
I have a simple movieclip symbol, with text fields, all with instance names, and need to find out how to pass the information from flash to a php
script. If anyone can help, or atleast point me towards a tutorial that uses something newer than flash 5 and newer than 2004, it would be awesome.Would any of these work?
http://www.webdesignmo.com/blog/2008/08/14/flash-contact-form-in-actionscript-3/
check this one first:
http://www.kirupa.com/forum/showthread.php?t=272898
http://www.edesignerz.net/flash/527--flash-cs3-as3-contact-form-with-php-parser-actionscri pt-3-video-tutorial
Hope this helps! -
Contact Form won't display input text
Hi,
I'm trying to create a flash contact form that sends the
user's message on enter key. Therefore I need you to help me do
this and also help me understand why my form isn't displaying right
when I have a mask for it.
To get a better picture of the problem
here you can
see how the form should look like and
here you can
see the same form, but with the maskI'm not sure I understand what you mean by "embed the fonts
in each of the text fields"
Please have a look at the .fla file:
http://www.claudiudesign.org/test/sterg.fla
(this fla has the mask; if you remove it you will be able to
see the working contact form)
It won't take you more than 1 min to understand what's up
with it if your good at this.
Thing is I'm behind the schedule with this and I have to
solve the problem as soon as possible.
Thank You -
Flash and PHP contact form.
Hi, I created a simple web site in flash cs4 with a contact form, however, when I press submit, no email is sent even though my site says it was successfully sent. If anyone could give any advice on what I could possibly being doing wrong that would be great.
Thanks, Anthony.
Here is my actionscript and PHP:
function submit(e:MouseEvent):void
var variables:URLVariables = new URLVariables();
variables.fromname = nameText.text;
variables.fromemail = emailText.text;
variables.frommessage = messageText.text;
var req:URLRequest = new URLRequest("contact.php");
req.data = variables;
req.method = URLRequestMethod.POST;
var loader:URLLoader = new URLLoader();
loader.dataFormat = URLLoaderDataFormat.VARIABLES;
loader.addEventListener(Event.COMPLETE, sent);
loader.addEventListener(IOErrorEvent.IO_ERROR, error);
loader.load(req);
statusText.text = "Sending...Please wait.";
function sent(e:Event):void
statusText.text = "Your email has been sent.";
nameText.text = emailText.text = messageText.text = "";
function error(e:IOErrorEvent):void
statusText.text = "Error, please try again.";
sendButton.addEventListener(MouseEvent.CLICK, submit);
PHP:
<?php
$sendTo = "[email protected]( I am aware this needs to be different)";
$subject = "Email from Web site";
$name = $_POST['fromname'];
$from = $_POST['fromemail'];
$message = $_POST['frommessage'];
$message = stripslashes($message);
$content = "Name: " . $name . "\n";
$content .= "Email: " . $from . "\n\n";
$content .= $message;
if (mail($sendto,$subject,$content))
echo 'response=passed';
else
echo 'response=failed';
?>I had the correct case in my code, so that was not the problem. It appears that the there is no communication with the server. Do you have any other ideas as to why the send button would not actually being contacting the server?
Thanks for the help -
Hello,
I am setting up a flash site (well trying too) and decided to get a Flash template of Template Monster so I could work on it, I have the site up and all but the contact form is not working properly. The problem is the Actionscript dosen't seem to work with the contact.php file that came in the template pack and when I contacted them it was of no help, I was just refered me to their help pages which showed I just had to insert my email address after rec="??????" and it would work. The actionscript is;
rec="[email protected]";
serv="php";
var fields_descriptions= Array ("",
Array("t1", "your_name", "Your Name:"),
Array("t2", "your_address", "Your Address:"),
Array("t3", "phone", "Telephone:"),
Array("t4", "message", "Message:"),
Array("t5", "your_email", "E-mail:"),
Array("t6", "field_3", "Address:"),
Array("t7", "field_4", "fax:")
function reset_txt(name,name2,value) {
path=eval(_target);
path[name2]=value;
this[name].onSetFocus=function() {
path=eval(_target);
if(path[name2]==value) { path[name2]="";}
this[name].onKillFocus=function() {
path=eval(_target);
if(path[name2]=="") { path[name2]=value;}
for (i=1; i<=fields_descriptions.length; i++) {
reset_txt("t"+i, fields_descriptions[i][1], fields_descriptions[i][2]);
And the contact.php file has the following script;
<?php
$your_name = $_GET['your_name'];
$your_address = $_GET['your_address'];
$phone = $_GET['phone'];
$your_email = $_GET['your_email'];
$message = $_GET['message'];
$headers .= 'Content-type: text/html; charset=iso-8859-1';
$content = "<html><head><title>Contact letter</title></head><body><br>";
$content .= "Company: <b>" . $your_company . "</b><br>";
$content .= "Name: <b>" . $your_name . "</b><br>";
$content .= "Phone: <b>" . $your_phone . "</b><br>";
$content .= "E-mail: <b>" . $your_email . "</b><br><hr><br>";
$content .= $your_message;
$content .= "<br></body></html>";
mail("[email protected]","New enquiry from website",$content,$headers);
?>
<html>
<body bgcolor="#282E2C">
<div align="center" style="margin-top:80px;color:#FFFFFF;font-size:16px;font-family:Tahom a;font-weight:bold">
Your message was sent to <br> East Coast Computer Services <br>We will be in contact with you soon. Thank you.
</div>
</body>
</html>
I do get email from the form in Outlook but the problem is it has no content just blank fields, see below:
From: [email protected] [mailto:[email protected]]
Sent: 24 March 2011 23:10
To: [email protected]
Subject: New enquiry from website
Company:
Name:
Phone:
E-mail:
I haven't got a breeze about Flash or PHP, I just know a small bit from using Dreamweaver. Would you know what is preventing the form from working, I know it something to do with Arrays but what do I change in the PHP file so I start to receive information in the contact form? Thank you in advance.
Kevinkglad,
The actionscript calls the PHP form but dosen't post any information, it loads in the browser and I get the email but nothing in it?
I'm just looking for the correct Actionscript to paste into flash and hopefully get it working. Thanks for the help. -
Contact.php file for my XML, Flash based contact form
I am trying to create a contact.php file for my XML, Flash based contact form.
Anybody know some good tutorials Please introduce me !
Amanda NguyenI think that I should post the 2 .xml files here:
structure.xml
<?xml version="1.0" encoding="utf-8" ?>
<contactFormStructure>
<formItems>
<item id="1" label="Name" required="true" />
<item id="2" label="E-mail" required="true">
<validator>EmailValidator</validator>
</item>
<item id="3" label="Message" required="true" />
</formItems>
</contactFormStructure>
configuration.xml
<?xml version="1.0" encoding="utf-8" ?>
<contactFormConfiguration>
<emailTo>[email protected]</emailTo>
<serverProcessorType>php</serverProcessorType>
<serverProcessorFileName>contact</serverProcessorFileName>
<validateRequiredOnly>false</validateRequiredOnly>
<submitFormOnEnter>true</submitFormOnEnter>
<messageSentText>Thank you for your message.</messageSentText>
<messageSentFailedText>The form is not submitted.</messageSentFailedText>
<formProcessingText>processing...</formProcessingText>
<plainText>false</plainText>
<emailFromSource>2</emailFromSource>
<subjectSource>Contact Form from your site</subjectSource>
<validationErrorMessages>
<message type="fieldIsRequired">{LABEL} is required.</message>
<message type="emailNotValid">{LABEL} - is not valid email address.</message>
<message type="minCharsLimitError">{LABEL} - The specified number of characters in a field is less
than a required minimum.</message>
<message type="reqExpError">{LABEL} - The specified string does not match with the regular
expression.</message>
<message type="biggerThanMaxError">{LABEL} - The specified number is greater than an acceptable
biggest number for this field.</message>
<message type="lowerThanMinError">{LABEL} - The specified number is lower than an acceptable
lowest number for this field.</message>
<message type="notANumberError">{LABEL} - The data is not a number.</message>
<message type="negativeError">{LABEL} - The specified number must not be negative.</message>
<message type="minRequirementError">{LABEL} - The minimum number of variants is not
selected</message>
<message type="maxRequirementError">{LABEL} - The number of variants selected exceeds the
maximum</message>
<message type="shouldBeEqualError">{LABEL} - values do not match</message>
<message type="dateIsNotValidError">{LABEL} - date has wrong format</message>
</validationErrorMessages>
</contactFormConfiguration>
I am working and learning and I would like to create the contact.php for my contact form.
Please help !
Amanda -
Contact Form (php) - how to prevent new window...
My contact form works just fine, however, I currently have
the target set to "_blank" which is not what I want.
Rather than opening the .php file open in a new window, I
just want to go to a new frame (labeled "success" or "error")
within my flash file (which currently works fine)
So, my question is how do I send the form information to my
php file WITHOUT having to open a new window outside of my flash
file since I'm sending the user to new frame instead.
FYI: I've already tried removing "_blank" but it still opens
the php file in a new browser window.
My code below:
on (release){
var my_lv:LoadVars = new LoadVars();
my_lv.fullName = fullName_txt.text;
my_lv.email = email_txt.text;
my_lv.emailMessage = emailMessage_txt.text;
if(fullName_txt.text != "" && email_txt.text != ""
&& emailMessage_txt.text != "") {
my_lv.send("contact.php","_blank","POST");
gotoAndStop("success");
else {
gotoAndStop("error");
Any help is greatly appreciated.
YvonneThanks for your help, Zupko.
I tried your suggestion but I'm still experiencing the same
problem. A new window still opens. Perhaps I'm doing something
wrong?
My code with your suggestion below:
on (release){
var my_lv:LoadVars = new LoadVars();
my_lv.fullName = fullName_txt.text;
my_lv.email = email_txt.text;
my_lv.emailMessage = emailMessage_txt.text;
if(fullName_txt.text != "" && email_txt.text != ""
&& emailMessage_txt.text != "") {
loadVariables("contact.php","POST");
gotoAndStop("success");
else {
gotoAndStop("error");
Your help is very much appreciated!
Yvonne
Maybe you are looking for
-
Help needed for file processing using FTP
Hi All, I am new to ODI tool and currently we are implementing one project in ODI. Could you please, any one help me on the following requirement... how to implement it? Scenario: i) I need to pick a file from remote host 'outbox' dir using FTP proce
-
icloud mail keeps asking me to enter my password over and over...very frustrating.
-
I want to incorporate the components in this .ocx file that I have into a labwindows project. I choose 'Create ActiveX Automation Controller' from the Tools menu. I do not see that particular server (.ocx file) on the selection menu, so I browse and
-
Airport extreme card installation
So, I'm probably an idiot but I have followed the instructions perfectly, but for some reason I can not get the card to firmly hold into its slot (unless it's flipped upside down. Is there some stupid little trick I'm missing??
-
Update of Safari download for 6.0.2 failed on 2 November 2012 with message "NSURLErrorDomain error -3001.)(102". Anyone have a suggestion? Thanks.