Flash Form and PHP

Thanks in advance for any help. The hosting company my
customer is using has PHP5 and my old scripts do not work with the
new host. I was however able to get a PHP5 script working. But the
problem is the script is sending 2 emails, 1 Filled out and 1
blank.
Can anyone tell me what's wrong with this script?
Thanks again.
Mike.

could you be a little more specific?

Similar Messages

  • Flash form and php help .....

    hi guys i upload all my files to my server but for some
    reason the information when i click the submit button never arrives
    to my email heres my code am using flash cs4 with actionscript 3 .
    thanks in advances .
    btw when i click on file and publish flash never creates the
    javascript file that it should create why ?

    quote:
    Originally posted by:
    lumija79
    hi guys i upload all my files to my server but for some
    reason the information when i click the submit button never arrives
    to my email heres my code am using flash cs4 with actionscript 3 .
    thanks in advances .
    btw when i click on file and publish flash never creates the
    javascript file that it should create why ?
    i think i know my mistake i didnt put ' inside the varibles
    ['fromemail'];
    i cant test this right now but if you see another error
    please let me know

  • Flash form and  Database integration using PHP

    One of the simpleest ways to Flash forms and data components
    to interact with a MySQL Database is with the use of PHP scripts.
    These scripts can be the intermediary between the Flash form and
    the MySQL Database. There are some
    FREE Tutorials available at
    http://www.interactivewebconcepts.com
    I hope this helps.
    Maurice

    I think i found your problem.
    It's a Syntax Error here you should use . instead of ,...
    [code]
    Subject",$CompanyName
    [/code]
    this should work.
    [code]
    Subject".$CompanyName
    [/code]

  • AS2 contact form and php - works fine but only sends half of the text in the comments field ???

    hi all - i have an AS2 contact form using php to send the info to my email address - it all works fine except this ..... rather than having an empty comments box in the flash movie i had added a whole bunch of feedback questions that the user can comment yes/no to in the comments box (my feedback questions were added into the input text box in cs3 so are there when the user opens the contact page .. i have set the maximum characters to 10000 so no worries that its that that is stopping it all coming through in the email ..... basically when i go to my form online and send it i get it through as an email but with only three quarters of the feedback text in it ...... i have tried a zillion ways a round this, tried other contact forms and php and always end up with the same problem ... any ideas any one ?
    this is the AS....
    stop();
    a =0;
    function validate () {
        if (from.length>=7) {
            if (from.indexOf("@")>0) {
                if ((from.indexOf("@")+2)<from.lastIndexOf(".")) {
                    if (from.lastIndexOf(".")<(from.length-2)) {
                        a = 1;
                        // email is fine
    function formcheck () {
        validate ();       
        trace(a);
        if (fname = "" or telno eq "" or comments eq "" or from eq "") {
            stop();
            error = "You have left blank fields, please fill in all fields, thank you";
        } else {
            emailcheck ();
    function emailcheck (){
        if (a != 1){
            stop();
            error = "Email address not valid";
            } else {
            loadVariablesNum("mail.php3", 0, "POST");
            gotoAndStop(2);
    ..........this is the php
    <?php
    $adminaddress = "[email protected]";
    $sitename = "Flash Site Form Mailer";
    mail("$adminaddress","Info Request",
    "A customer at $sitename has made the following enquiry\n
    First Name: $name
    Company Name: $company
    Telephone: $telno
    Email: $from\n
    The visitor commented:
    $comments
    Logged Info :
    Using: $HTTP_USER_AGENT
    Hostname: $ip
    IP address: $REMOTE_ADDR
    Date/Time:  $date","FROM:$adminaddress");
    ?>
    any help much appreciated

    i think you should not use $HTTP_USER_AGENT.
    and use loadvars instead of loadvariablesnum:
    stop();
    a =0;
    function validate () {
        if (from.length>=7) {
            if (from.indexOf("@")>0) {
                if ((from.indexOf("@")+2)<from.lastIndexOf(".")) {
                    if (from.lastIndexOf(".")<(from.length-2)) {
                        a = 1;
                        // email is fine
    function formcheck () {
        validate ();       
        trace(a);
        if (fname = "" or telno eq "" or comments eq "" or from eq "") {
            stop();
            error = "You have left blank fields, please fill in all fields, thank you";
        } else {
            emailcheck ();
    var sendLV:LoadVars=new LoadVars();
    function emailcheck (){
        if (a != 1){
            stop();
            error = "Email address not valid";
            } else {
    sendLV.name=fname;
    sendLV.telno=telno;
    sendLV.company=company;  //assuming company is a variable in your flash
    sendLV.comments=comments;
    sendLV.send("mail.php3", "POST");
            gotoAndStop(2);
    //..........this is the php
    <?php
    $adminaddress = "[email protected]";
    $sitename = "Flash Site Form Mailer";
    $from=?;//you need to define this variable
    $name=$_POST['name'];
    $telno=$_POST['telno'];
    $company=$_POST['company'];
    $comments=$_POST['comments'];
    $body=
    "A customer at $sitename has made the following enquiry\n
    First Name: $name
    Company Name: $company
    Telephone: $telno
    Email: $from\n
    The visitor commented:
    $comments";
    mail($adminaddress,"Info Request",$body);
    ?>

  • Flash Forms and Checkboxes

    I'm creating a Flash Form and I have a group of 4 checkboxes,
    and the value part of the input statement is as follows:
    <cfif
    Isdefined('Form.whatever1')>1<cfelse>1</cfif>
    <cfif
    Isdefined('Form.whatever2')>1<cfelse>1</cfif>
    <cfif
    Isdefined('Form.whatever3')>1<cfelse>1</cfif>
    <cfif
    Isdefined('Form.whatever4')>1<cfelse>1</cfif>
    But when I submit the record, all of the checkboxes are
    recorded as "1", even if none of them or some of them are checked.
    Has anyone developed a flash form with checkboxes and experienced
    similar issues?
    Thanks...

    Oh, forgot to mention that I used the same code in a
    "regular" form, and it worked. Just curious as to if this is a
    known Flash Form problem

  • Flash Forms and onchange

    OK, I need help. I've just started using flash forms, and I
    love them. But, I have a problem. In this example I have cfinput
    boxes a, b, and c. After the user adds data to a and b, I use
    javascript to subtract b from a and insert the value into c, using
    onchange="subtractme();" in the b tag. Problem is, the form never
    loads. What am I doing wrong?
    <script language="javascript">
    function subtractMe1() {
    document.cool.c.value=Math.round(document.cool.a.value -
    document.cool.b.value);
    </script>
    <cfform name="cool" format="flash">
    <cfinput type="text" name="a" width="60" >
    <cfinput type="text" name="b" width="60"
    onChange="subtractMe1();">
    <cfinput type="text" name="c" width="60">
    </cfform>

    On Linux or Unix, you may need to create a symlink to cfide
    directory as CFIDE (case sensitive) in your web directory. Have
    your host issue the following command.
    ln -s /path/to/web/dir/cfide CFIDE
    Additionally, Firefox 1.5 loads Rich Flash forms fine on my
    OSX running Panther 10.3.9.
    Rock.
    -S

  • Flash cs3 and php problem (system error)

    Hi All,
    Been checking out a free utility, called Tell A Friend - followed the instructions to a t but still getting system error.
    Here is the php code:
    <?php
    $to = ($_POST['friend']);
    $link = ($_POST['link']);
    $subject = "Tell a friend";
    $message = "Your friend ";
    $message .= $_POST['name'] . " wants advice you the following link: ".$link;
    $headers = "My WebSite Name";
    if(@mail($to, $subject, $message, $headers))
    echo "answer=ok";
    else
    echo "answer=error";
    ?>
    The main swf has a main.as attached:
    * Flash Tell A Friend
    * http://www.FlepStudio.org        
    * Author: Filippo Lughi          
    * version 1.0                      
    package
    import flash.display.*;
    import flash.events.*;
    import flash.utils.*;
    import flash.external.*;
    import flash.net.*;
    public class main extends MovieClip
      private const PHP_URL:String="sendMail.php";
      private var checker:CheckEmail;
      private var timer:Timer;
      public function main()
       addEventListener(Event.ADDED_TO_STAGE,init);
      private function init(evt:Event):void
       removeEventListener(Event.ADDED_TO_STAGE,init);
       stage.frameRate=31;
       checker= new CheckEmail();
       addInputListener();
       addSendListener();
      private function addInputListener():void
       clip_mc.name_txt.background=true;
       clip_mc.name_txt.backgroundColor=0x999999;
       clip_mc.name_txt.addEventListener(FocusEvent.FOCUS_IN,onFocusIn);
       clip_mc.name_txt.addEventListener(FocusEvent.FOCUS_OUT,onFocusOut);
       clip_mc.email_txt.background=true;
       clip_mc.email_txt.backgroundColor=0x999999;
       clip_mc.email_txt.addEventListener(FocusEvent.FOCUS_IN,onFocusIn);
       clip_mc.email_txt.addEventListener(FocusEvent.FOCUS_OUT,onFocusOut);
      private function onFocusIn(evt:Event):void
       evt.target.background=true;
       evt.target.backgroundColor=0xFFFFFF;
      private function onFocusOut(evt:Event):void
       evt.target.backgroundColor=0x999999;
      private function addSendListener():void
       clip_mc.send_mc.mouseChildren=false;
       clip_mc.send_mc.buttonMode=true;
       clip_mc.send_mc.addEventListener(MouseEvent.MOUSE_DOWN,onSendDown);
      private function onSendDown(evt:MouseEvent):void
       if(clip_mc.name_txt.text!="")
        if(checker.initCheck(clip_mc.email_txt.text))
         sendEmail();
        else
         displayPhrase("Invalid Email");
       else
        displayPhrase("Invalid name");
      private function sendEmail():void
       clip_mc.send_mc.mouseEnabled=false;
       var variables:URLVariables=new URLVariables();
       variables.name=clip_mc.name_txt.text;
       variables.friend=clip_mc.email_txt.text;
       variables.link=ExternalInterface.call('window.location.href.toString');
       var request:URLRequest=new URLRequest();
       request.url=PHP_URL;
       request.method=URLRequestMethod.POST;
       request.data=variables;
       var loader:URLLoader=new URLLoader();
       loader.dataFormat=URLLoaderDataFormat.VARIABLES;
       loader.addEventListener(Event.COMPLETE,onMessageSent);
       try
        loader.load(request);
       catch (error:Error)
        trace('Unable to load the document.');
      private function onMessageSent(evt:Event):void
       var vars:URLVariables=new URLVariables(evt.target.data);
       if(vars.answer=='ok')
        displayPhrase("Message Sent!");
       else
        displayPhrase("System Error!");
       clip_mc.send_mc.mouseEnabled=true;
       clip_mc.name_txt.text="";
       clip_mc.email_txt.text="";
      private function displayPhrase(s:String):void
       clip_mc.display_txt.text=s;
       resetPhrase();
      private function resetPhrase():void
       timer=new Timer(1500,1);
       timer.addEventListener(TimerEvent.TIMER,hidePhrase);
       timer.start();
      private function hidePhrase(evt:TimerEvent):void
       clip_mc.display_txt.text="";
    Any help appreciated. This is a great viral marketing tool, when it ever works
    Kind Regards,
    Boxing Boom

    Never seen such an error, but if it's in the status bar of the browser then it shouldn't be Flash problem. You can check what's happening in your swf by creating a dynamic text field and setting it's text in every major action, that is: requesting PHP and getting back response, to what's just happened.
    So, on the Flash side you can see whether the browser error stops the PHP script and immobilizes further actions.
    What I'd do is create a new Flash file and PHP file and just send 1 variable to PHP, change it somehow and send it back to Flash and print it in a text field. That way you can check whether it's the method you're using to request PHP or just PHP or something else. Step by step adding complexity and checking on which of these steps the error occurs.
    I wish you good luck.
    Ps. It's probably a very rookie problem, we just don't know the source.

  • PDF forms and PHP

    Hello!
    I've build a PDF Form and, after extending it with Reader Extension, tested it sending form data to a PHP file, where info is being retrieved via $_POST.
    The idea is to save the info in a database.
    It worked, but it also opens the php file in the browser; I don't want this to happen, all I want is to save the data and that's it.
    I used an http submit button from the objects panel.
    What do I do to solve it? Should I use Javascript to make it work the way I want?
    Thank you for any hints.
    Marcos

    Can you write a PHP Web Service and consume the data? Thereby you can suppress opening the PHP file in a browser.
    Nith

  • Data Communication between flash 8 and php (facebook)

    I do have knowledge on php and flash 8. But it is my first
    time in trying to analyse the facebook architecture and have to
    admit I am a bit confused. Ok I have figured out the communication
    part between php and facebook but I failed to understand the
    communication when flash 8 comes into the picture.
    1) Client logins in to facebook (Client PC -> Facebook
    Server)
    2) Client click on my game application and waits (Client
    Request->Facebook Server->My Server)
    3) My php script checks for client audentication using
    facebook params and load flash 8 application to client PC via
    facebook iframe OR FBML (My Server (.php) -> My Server (.swf)
    -> Facebook (Iframe or FBML) ->Client PC)
    4) Client starts to play.
    ----------> Ok step 1 to 4, I know how to do it. But it is
    this following that I am confused.
    5) Client make some changes in the flash 8 application (For
    example: He is preparing for an invasion and have included total
    soldiers needed and generals needed and click 'invade') and click
    the button to save the datas to my server. The problem here is how
    to do this while ensuring $fb_params is consistent?
    (a) Can I just use sendandload via POST and my php side will
    received the POST data as usual($_POST['soldiersneeded'])? Or do I
    miss out anything?
    (b) Can I use amfphp as usual so as to prevent the
    application from refreshing itself everytime it loads in the new
    data?
    Hope there is a facebook expert who could explain to me in
    regards to this problem. Please do take note that I am using flash
    8 and not CS3 or CS4. Thanks in advance and have a nice day
    everyone! ^_^

    Have you read this manual?
    Regards,
    André
    Using whatever version of LV the customer requires. (LV5.1-LV2012) (www.carya.nl)

  • Flash Forms and Eolas Fix

    Has anyone seen a workable fix with regard to the Eolas
    problem. For those unfamiliar, I'm referring to the box around all
    Flash content requiring the user to click before they can interact
    with the form.
    I'm particularly interested in the fix for Flash Forms in
    ColdFusion. I have MX7 installed. I have a JS script for
    movies...but to date, nothing works for Flash Forms.

    Have you tried CFMX 702 updater? That has a fix for EOLAS
    issue.
    More details at:
    http://www.asfusion.com/blog/entry/eolas-fix-for-coldfusion-flash-forms

  • CF Flash Form and CFGRID

    Hello,
    I'm trying to create a page CFFORM flash page where the
    cfgrid will display results base on a start and end date. The user
    selects these 2 date. I am able to create this on 2 seperate pages,
    but I would like it to be on 1 page via the flash remoting method.
    Can some please help or point me in the right directions.
    Thanks,

    Hi-
    I copied your form code and submitted the variables back to
    that page, and got no error, for what that's worth. My guess is
    that the prob. might be in the page you're submitting to rather
    than in the form itself?

  • Flash banners and PHP...

    Hey Flash ppl... LOL, I have a nice flash banner I did for my
    gaming clans website. The issue is that it reload everytime anyone
    goes to a new topic, post something or does anything that reloads
    the page. Is there a script out there that I can place to get
    around that? I know PHP is different then HTML... so I don't know
    if there's a work around? Any help would be appreciated! Thanks!
    http://www.shadowops.org/Forums/index.php

    Hi James,
    That is one awesome looking banner! Good job!. I think you
    hit the key about multiple platforms making one single page. You
    noticed that when the page reloaded the flash reloads. This is
    normal. One trick to get around that is by using a PHP equivalent
    of an <IFRAME></IFRAME> in your php code. You develop a
    way to reload the Iframe rather than the whole page. Or you could
    go back to the older days and use the <FRAME> tag and only
    reload the frame element.
    Another way would be to develop an entire site in flash and
    you only play the elements that need data to change. I am sure
    there are other ways but this is a quick way out.
    Again, great job on the banner!
    Doug

  • Flash form to PHP/database

    i'm going crazy and i hope someone can help me
    here is the script i'm trying to pass to the php page
    PHP Checkbox tutorial
    www.flashscript.biz, 2005
    stop ();
    // importing button and checkbox class
    var name_txt:mx.controls.TextInput;
    var email_txt:mx.controls.TextInput;
    var company_txt:mx.controls.TextInput;
    var newsletter:mx.controls.CheckBox;
    var submitBut:mx.controls.Button;
    var messageBox:TextField;
    // LoadVars objects
    var lv:LoadVars;
    lv = new LoadVars ();
    var lvAnswer:LoadVars;
    lvAnswer = new LoadVars ();
    // button label
    submitBut.label = "Submit";
    // we give "myCheckbox" a default value
    var myCheckbox:String;
    myCheckbox = "selected";
    // we create a listener for the checkbox to increase either
    number
    var checkListener:Object = new Object ();
    checkListener.click = function () {
    // here we let the user select
    if (newsletter.selected) {
    myCheckbox = "isSelected";
    } else {
    myCheckbox = "not selected";
    newsletter.addEventListener ("click", checkListener);
    // sending out the data
    submitBut.onRelease = function () {
    messageBox.text="Please wait.";
    lv.name_txt = name_txt;
    lv.email_txt = email_txt;
    lv.company_txt = company_txt;
    lv.myCheckbox = newsletter;
    lv.action = "send";
    lv.sendAndLoad ("includes/techinfo_signup.php", lvAnswer,
    "POST");
    // receiving the data from the php file
    lvAnswer.onLoad = function () {
    messageBox.text = this.result;
    the text field caomes back as undefined
    the php page is calling
    name_txt
    email_txt
    company_txt
    myCheckbox / newsletter
    here is the url so you can see what i'm talking about...
    http://www.lightningmedia.com/form_test.php
    any help would save me life.... thanks
    cheers
    -n8

    ok so i;ve gon back to the down a dirty way of doing this...
    http://www.lightningmedia.com/form_test.php
    (technical info tab)
    each text field has a Var: Name, email, and company
    i've used the CheckBox component
    i;ve placed the fallowing code on the submit button
    on (release) {
    if (!email.length || email.indexOf("@") == -1 ||
    email.indexOf(".") == -1) {
    EmailStatus = "Please enter a valid E-mail address";
    } else {
    loadVariablesNum("includes/techinfo_signup.php", 0, "POST");
    this.gotoAndStop(2);
    easy enough right?
    everything works fine but the CheckBox......
    i'm trying to send a 1 or 0 to the database.
    i've given the component a
    fieldname: newsletter (the same as the field in the database)
    data type: Boolean
    required: true
    Read only: false
    kind: data
    formatter:none
    encoding:none
    default value:1
    path: includes/techinfo_signup.php
    storage type: simple
    so what am i missing? i'm at a loss...
    thanks again

  • Flash builder and php session management/login

    I've secured pages with cflogin using coldfusion but is there a comparible function in PHP?  I'm able to connect to a php/mysql DB but how do I lock those functions down with a login/password style security?
    Thanks

    Hi,
    I think this article contains what you are looking for.
    http://sudhirmanjunath.blogspot.com/2009/10/how-to-set-basic-authentication-for-php.html
    Please write back if you need any further clarifications.
    Thanks,
    Sudhir

  • Javascript and Flash Forms

    I am trying to do some Javascript with a Flash Form and it is
    failing. I have a field with a value in the field name so I dont
    have to use labels. I know with Javascript that onFocus, the field
    will clear. Is that possible in a Flash Form.
    Don

    Use actionscript, like so
    <cfinput type="Text" name="txt_box" value="Initial Value"
    onFocus="txt_box.text=''">
    For readability the onFocus is
    " txt_box.text = ' ' "
    Ken

Maybe you are looking for

  • IPhoto (9.6) No longer works after Yosemite Update! Please Help. The error message I get is below.

    Error Message: "Your photo library is either in use by another application or has become unreadable. Shut down and restart your computer, and then open iPhoto again. If the problem persists, try rebuilding your photo library. To do this, quit iPhoto,

  • Can I add an ssd hard drive to my pavillion m7-1015dx

    What do I need to do to add a ssd drive to my HP Pavillion M7-1015dx currently on windows 7 64 bit, but planning to upgrade to windows 8 64 bit This question was solved. View Solution.

  • SAP WM-PP: Spit transfer requirements

    Hello, We are working in a WM-PP scenario with transfer requirements and transfer orders. For one process we need to use the "2 step picking" functionality of the SAP system. In the release of the production order, the system is creating the transfer

  • ORA-02049: timeout: distributed transaction waiting for lock

    Hi, My name is Guneet and I'm working on an application running on BEA Weblogic Server 9.2 running on a Red Hat Linux box using Oracle 10g as the database. My problem is that recently our code started getting the following exception while updating a

  • Business Logic in Taghandler methods???

    Hi, Is there any reason that the business operation(logic) in a TagHandler class should take place in a doEndTag() for TagSupport class and doAfterBody() in BodyTagSupport class? If so, why it can't be done in the doStartTag() and doInitBody() ? Than