Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 01-03-2008, 07:25 PM   #1
mastagolf
Registered User
 
Join Date: Jan 2008
Posts: 1
Default Flash 8 form using components and php

I have looked at several tutorials but non seem to get me where i am needing to go to be able to create a form with several text input fields and flash 8 ui components (combo box and radio buttons). Currently, the movie works and the clear button works, but the email that is sent does not have anything except the email/subject and message. I have tried several different ways to get the other stuff to work.

My flash movie has input fields with instance names of(name_box/email_box/address_box/state_box/zip_box/phone_box/message_box) and I am trying to incorporate 2 combo boxes and 3 radio buttons.

On the actions frame of the first frame (I have no clue how to add the components) heres what I have for the test boxes...

stop();

send_btn.onRelease = function() {
my_vars = new LoadVars();
my_vars.name = name_box.text;
my_vars.address = address_box.text;
my_vars.state = state_box.text;
my_vars.zip = zip_box.text;
my_vars.phone = phone_box.text;
my_vars.sender = email_box.text;
my_vars.subject = subject_box.text;
my_vars.message = message_box.text;

if (my_vars.name != "" and my_vars.sender != "" and my_vars.address != "" and my_vars.city != "" and my_vars.state != "" and my_vars.zip != "" and my_vars.phone != "" and my_vars.subject != "" and my_vars.message != "") {
my_vars.sendAndLoad("estimate.php", my_vars, "POST");
gotoAndStop(2);
} else {
error_clip.gotoAndPlay(2);
}
my_vars.onLoad = function() {
gotoAndStop(3);
};
};
name_box.onSetFocus = email_box.onSetFocus = address_box.onSetFocus = city_box.onSetFocus = state_box.onSetFocus = zip_box.onSetFocus = phone_box.onSetFocus =subject_box.onSetFocus=message_box.onSetFocus=fun ction () {
if (error_clip._currentframe != 1) {
error_clip.gotoAndPlay(6);
}
};


For the PHP code I also do not know how to add the components piece but heres what I have:

<?php


$name = stripslashes($name);
$sender = stripslashes($sender);
$address = stripslashes($address);
$state = stripslashes($state);
$city = stripslashes($city);
$zip = stripslashes($zip);
$phone = stripslashes($phone);
$message = stripslashes($message);
$subject = stripslashes($subject);

$subject = "Kilpatrick Lawn Estimate Form ". $subject;


if(isset($message) and isset($name) and isset($address) and isset($city) and isset($state) and isset($zip) and isset($phone) and isset($subject) and isset($sender)){
mail("[email protected]", $subject, $message, "From: $sender");
}
?>

I have posted the source files / php file here for reference...
http://www.kilpatricklawns.com/download.html

Any tutorials out there to help me figure out how to incorporate the components and also add the additional input text boxes?

Thanks in advance for any help.
mastagolf is offline   Reply With Quote
Old 01-07-2008, 04:27 PM   #2
mojito
Senior Member
 
mojito's Avatar
 
Join Date: Jun 2001
Location: London
Posts: 523
Default take out your validation

First take out your validation, this is just the first step in debugging this, and let us know what that gives.

I cant quickly see the problem but this is complicating things right now, step through the steps, you are trying to get it all to work at once.

Do I understand that you do get something sent to the php script ?

if you send as "get" you can quickly see what is getting sent in the querystring.
__________________
Random Life and other painful life.
mojito is offline   Reply With Quote
Reply


Thread Tools
Display Modes 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 Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Flash Form to PHP seby20 ActionScript 2.0 4 08-16-2007 12:44 AM
XML / PHP / Flash / Components anime4tw ActionScript 2.0 0 04-17-2006 01:39 PM
PHP & Flash mx pro 2004 sending variables on contact form jesse8771 Server-Side Scripting 1 02-02-2006 05:16 PM
Form with components and PHP arturo Components 2 09-20-2004 05:39 PM
[Q] Do we need those forums??? CyanBlue General Chat 59 07-27-2004 11:13 AM


All times are GMT. The time now is 06:51 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.