A Flash Developer Resource Site

Results 1 to 10 of 10

Thread: Flashmatic form

  1. #1
    Always Confused aeliayousaf's Avatar
    Join Date
    Aug 2000
    Posts
    203

    Flashmatic form

    hey guys...
    I am trying to work with a flash feedback form that i got from here: http://www.flashmatics.co.uk/ .. everything is working, except i need to add a few more fields - which i did in the flash file. but how can i get those fields to show up i the email. currently only the feedback field shows up in the email.

    thanks for your help!

  2. #2
    Prid - Outing Nig 13's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    1,864
    Hi,

    you see this code:

    Actionscript Code:
    sendData_lv.name = name_txt.text;
    sendData_lv.email = email_txt.text;
    sendData_lv.feedback = feedback_txt.text;

    Just add another line with your own variable, for example:

    Code:
    sendData_lv.example = example_txt.text;
    Notice the emphasized example variable. Open your .PHP file, and to use your sent information, use this syntax:

    $_POST['variable_name']

    where variable_name is the variable name you declared, in this case, it's example, then the code would look like this:

    $_POST['example']

    Now, use that wherever you want in the PHP file

    Hope this helps
    I am back, guys ... and finally 18 :P

    BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS

  3. #3
    Always Confused aeliayousaf's Avatar
    Join Date
    Aug 2000
    Posts
    203
    i have already done that...but did not work.

    flash:
    sendData_lv.name = name_txt.text;
    sendData_lv.email = email_txt.text;
    sendData_lv.how = how_txt.text;
    sendData_lv.phone = phone_txt.text;
    sendData_lv.feedback = feedback_txt.text;


    php:
    <?php
    $name = $_POST['name'];
    $email = $_POST['email'];
    $how = $_POST['how'];
    $phone = $_POST['phone'];
    $feedback = $_POST['feedback'];
    $subject = 'Message from Client';
    $headers = "From: $name <$email>\n";
    $headers .= "Reply-To: $name <$email>\n";


    //ENTER YOUR EMAIL ADDRESS HERE
    $to = 'aeliayousaf@hotmail.com';
    //---------------------------


    $success = mail($to, $subject, $feedback, $headers);
    if($success){
    echo '&sent=OK';
    }else{
    echo '&sent=Error';
    }
    ?>

  4. #4
    Prid - Outing Nig 13's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    1,864
    It's not working because you are never sending the other received variables to your email

    $feedback = $_POST['feedback'];

    only this one is being sent, since it's the actual message in the mail that is being sent. Just add other stuff to it, and remember that . (a dot) in PHP is the equivalent to + (plus) in Flash, so for example:

    PHP Code:
    $feedback "Name: " $name "\n" "How: " $how "\n" "Phone: " $phone "\r\n" $_POST['feedback']; 
    \n means linebreak
    I am back, guys ... and finally 18 :P

    BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS

  5. #5
    Always Confused aeliayousaf's Avatar
    Join Date
    Aug 2000
    Posts
    203
    bro i tried it, but still not working. i have attached my flash file and the php. please see what i am doing wrong.
    thanks
    Attached Files Attached Files

  6. #6
    Prid - Outing Nig 13's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    1,864
    Umm, something called testing it online after uploading it to your server, because it won't work offline
    I am back, guys ... and finally 18 :P

    BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS

  7. #7
    Always Confused aeliayousaf's Avatar
    Join Date
    Aug 2000
    Posts
    203
    Quote Originally Posted by Nig 13 View Post
    Umm, something called testing it online after uploading it to your server, because it won't work offline
    lol i did bro...i'm not that stupid lol

  8. #8
    Prid - Outing Nig 13's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    1,864
    nah, you're not, but I tried it online and it worked for me
    I am back, guys ... and finally 18 :P

    BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS

  9. #9
    Always Confused aeliayousaf's Avatar
    Join Date
    Aug 2000
    Posts
    203
    really eh...like i said it works for me, but only the message field shows up...

  10. #10
    Prid - Outing Nig 13's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    1,864
    Then have you tried re-uploading the new PHP file (or replacing it with the other one) in your server?
    I am back, guys ... and finally 18 :P

    BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS

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