A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: In need of URGENT help with contact form AS2

  1. #1
    Junior Member
    Join Date
    Aug 2012
    Posts
    11

    In need of URGENT help with contact form AS2

    So, I've got a contact form which was created in Flash and a .php file to accompany it. When uploading it to test, it won't work. I don't know what I've done wrong

    could someone please help?

  2. #2
    Senior Member
    Join Date
    Jan 2011
    Posts
    171
    Post your contact form FLA along with PHP

    arkitx

  3. #3
    Junior Member
    Join Date
    Aug 2012
    Posts
    11
    email.fla

    Thats the .fla file. It won't let me upload the php file but the code I've used is:

    // read the variables form the string
    $theName = $_REQUEST["theName"]; $theEmail = $_REQUEST["theEmail"]; $theMessage = $_REQUEST["theMessage"]; $theChoice = $_REQUEST["theChoice"];

    <?PHP

    $to = "ay_ozyigit@hotmail.co.uk";
    $subject = "contact form test form FlashDen";
    $message = "Name: " . $theName;
    $message .= "\nEmail: " . $theEmail;
    $message .= "\nIP Adress: " . $_SERVER['REMOTE_ADDR'];
    $message .= "\nBrowser: " . $_SERVER['HTTP_USER_AGENT'];
    $message .= "\n\nChoice: " . $theChoice;
    $message .= "\n\nMessage: " . $theMessage;
    $headers = "From: $theEmail";
    $headers .= "\nReply-To: $theEmail";


    $sentOk = mail($to,$subject,$message,$headers);

    echo "sentOk=" . $sentOk;

    ?>


    hope this is ok. Thank you soo much for helping

    I've uploaded the file at www.aycreativity.co.uk and if you try it out, it automatically directs me to the 'message failed to send' page
    :S

  4. #4
    Senior Member
    Join Date
    Jan 2011
    Posts
    171
    PHP Code:
    <?PHP

    // read the variables form the string
    $theName $_REQUEST["theName"]; $theEmail $_REQUEST["theEmail"]; $theMessage $_REQUEST["theMessage"]; $theChoice $_REQUEST["theChoice"];



    $to "ay_ozyigit@hotmail.co.uk";
    $subject "contact form test form FlashDen";
    $message "Name: " $theName;
    $message .= "\nEmail: " $theEmail;
    $message .= "\nIP Adress: " $_SERVER['REMOTE_ADDR'];
    $message .= "\nBrowser: " $_SERVER['HTTP_USER_AGENT'];
    $message .= "\n\nChoice: " $theChoice;
    $message .= "\n\nMessage: " $theMessage;
    $headers "From: $theEmail";
    $headers .= "\nReply-To: $theEmail";


    $sentOk mail($to,$subject,$message,$headers);

    echo 
    "sentOk=" $sentOk;

    ?>


    arkitx

  5. #5
    Junior Member
    Join Date
    Aug 2012
    Posts
    11
    Thank you Artkitx, but I've just copied the coding you sent back and tried it again, it still comes up with 'message failed' page!

  6. #6
    Senior Member
    Join Date
    Jan 2011
    Posts
    171
    PHP Code:
    <?PHP 

    // read the variables form the string 
    $theName $_REQUEST["theName"];
    $theEmail $_REQUEST["theEmail"];
    $theMessage $_REQUEST["theMessage"];
    $theChoice $_REQUEST["theChoice"];



    $to "ay_ozyigit@hotmail.co.uk"
    $subject "contact form test form FlashDen"
    $message "Name: " $theName
    $message .= "\nEmail: " $theEmail
    $message .= "\nIP Adress: " $_SERVER['REMOTE_ADDR']; 
    $message .= "\nBrowser: " $_SERVER['HTTP_USER_AGENT']; 
    $message .= "\n\nChoice: " $theChoice
    $message .= "\n\nMessage: " $theMessage
    $headers "From: $theEmail"
    $headers .= "\nReply-To: $theEmail"


    $sentOk mail($to,$subject,$message,$headers); 

    echo 
    "&sentOk=" $sentOk

    ?>


    arkitx

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