A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: [CS3] Mail form

  1. #1
    Junior Member
    Join Date
    May 2008
    Posts
    2

    [CS3] Mail form

    Hi! Im trying to make a flash form with email function. But somthing is from. Can anyone look at this code and give me some advice. The form shows properly on the web, buth seems to have problem with the send function.

    the php looks like this

    <?php
    $theName= $_POST['theName'];
    $theEmail= $_POST['theEmail'];
    $theMessage= $_POST['theMessage'];

    $to = "info@friendsofvcds.org";
    $subject = "Medlemsregistrering";
    $message = "Name: " . $theName;
    $message .= "\nEmail " . $theEmail;
    $message .="\n\nMessage: " . $theMessage
    $headers = "From $theEmail";
    $headers .="\nReply-To: $theEmail";

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

    ?>





    and the code in the flash action looks like this (its placed on the first frame)




    stop();

    var senderLoad:LoadVars = new LoadVars();
    var receiveLoad:LoadVars = new LoadVars();

    sender.onRelease = function() {
    senderLoad.theName = theName.text;
    senderLoad.theEmail = theEmail.text;
    senderLoad.theMessage = theMessage.text;
    senderLoad.theAdress = theAdress.text;
    senderLoad.thePostnr = thePostnr.text;
    senderLoad.theStad = theStad.text;
    senderLoad.sendAndLoad("send.php",receiveLoad);
    }

    receiveLoad.onLoad = function() {
    if(this.sentOk) {
    _root.gotoAndStop("success");
    }
    else {
    _root.gotoAndStop("failed");
    }
    }

  2. #2
    Senior Member
    Join Date
    Jan 2008
    Posts
    394
    i suggest using a form by itself, online generators are out there that let you customize the same stuff.
    ex. subject, to, from, name

    try this
    http://www.tele-pro.co.uk/scripts/contact_form/

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