A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: contact form works fine just wont send all the info the user out in - why ????

  1. #1
    Junior Member
    Join Date
    Feb 2005
    Posts
    22

    contact form works fine just wont send all the info the user out in - why ????

    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 = "bwclan@msn.com";
    $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

  2. #2
    Registered User
    Join Date
    Feb 2001
    Posts
    13,041
    Hi,

    first of all, loadvariablesNum and eq comparison are features from Flash 4 ... long before anybody thought about AS2. Why not use koadvars object with sendandload() method?

    The other thing: I cannot see how the result of the many yes/no questions makes up the comments field. Are you sure this part in your AS works right - in particular, are you sure that there are no stray & in your data?

    Musicman

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center