A Flash Developer Resource Site

Page 3 of 3 FirstFirst 123
Results 41 to 57 of 57

Thread: small Form

  1. #41
    Senior Member
    Join Date
    Feb 2004
    Posts
    494

    I got it yeah!!!

    Ok I get e-mails now

    Only one issue yet. Th form is name,company,email and message.

    I fill out the form like so:
    name:joe
    company:main
    email:test@test.com
    message: this is a test!

    I get this in the e-mail:
    from: Nobody
    subject: testing mail

    joemain


    That is all I get all together one line now e-mail or message at all and no break like.
    Name: Joe
    Company: Main
    E-mail: test@test.com
    Message: This is a test!


    This is the action script:

    on (release) {
    subject = "Testing Mail";
    message = name+company+email2;
    this.loadVariables("http://www.main.com/test/simplemail3.php", "POST");
    mailstatus="Message being processed";}

    The Php is:

    <?php
    $email ="info@main.com";
    $subject = $HTTP_POST_VARS['subject'];
    $message = $HTTP_POST_VARS['message'];
    mail($email, $subject, $message);
    echo "mailstatus=The mail has been sent!&thescript=done&";
    ?>


    How do I resolve this issue?

    Thanks
    Last edited by tim_ver; 10-27-2004 at 06:08 PM.

  2. #42
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    You do as we did in earlier posts. To add linebreaks, newline

    message="Name="+name+newline+"Company="+company+ne wline;

    To get a "from" I dont know.

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

  3. #43
    Senior Member
    Join Date
    Feb 2004
    Posts
    494

    ..

    Updated with the scripts above.


    Like this:

    on (release) {
    subject = "Testing Mail";
    message="Name="+name+newline+"Company="+company+ne wline+"email2+newline+"message2;
    this.loadVariables("http://www.main.com/test/simplemail3.php", "POST");
    mailstatus="Message being processed";}

    Does this give it the look of:

    Name: Joe
    Company: main

    ?
    Last edited by tim_ver; 10-27-2004 at 06:25 PM.

  4. #44
    Senior Member
    Join Date
    Feb 2004
    Posts
    494

    .

    message="Name="+name+newline+"Company="+company+ne wline+"email2="+email2+newline+"textmessage="+text message+newline;

    it is only giving name,company is it in php where var is missing to send the last 2?

    The php script is:

    <?php
    $email ="info@main.com";
    $subject = $HTTP_POST_VARS['subject'];
    $name = $HTTP_POST_VARS['name'];
    $company = $HTTP_POST_VARS['company'];
    $email2 = $HTTP_POST_VARS['email2'];
    $message = $HTTP_POST_VARS['message'];
    mail($email, $subject, $name, $company, email2, $message);
    echo "mailstatus=The mail has been sent!&thescript=done&";
    ?>

    It hangs on message being proccessed....
    never sends it. Weird though I got name and company and not the other two so I added vars in php script and now notta.
    Last edited by tim_ver; 10-28-2004 at 07:25 PM.

  5. #45
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    Try with...

    mail($email, $subject, $message);


    ....as the the other variables are included from the "meddage" var in Flash.

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

  6. #46
    Senior Member
    Join Date
    Feb 2004
    Posts
    494

    ..

    That is what did work but only gave me:
    whenI typed 1 2 3 4
    I got

    Name=1
    Company=2
    email2=
    message=

    I looked in the server error log and saw this:

    [error] PHP Warning: mail() expects at most 5 parameters, 6 given in /home/bsp/public_html/test/simplemail3.php on line 8
    [error] PHP Warning: mail() expects at most 5 parameters, 6 given in /home/bsp/public_html/test/simplemail3.php on line 5

    php is:

    <?php
    $email ="info@main.com";
    $subject = $HTTP_POST_VARS['subject'];
    $name = $HTTP_POST_VARS['name'];
    $company = $HTTP_POST_VARS['company'];
    $email2 = $HTTP_POST_VARS['email2'];
    $message = $HTTP_POST_VARS['message'];
    mail($email, $subject, $name, $company, email2, $message);
    echo "mailstatus=The mail has been sent!&thescript=done&";
    ?>

  7. #47
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    Theb you have to use less variables in the php ( like the one I wrote with just 3 ).

    Im not good with php as I mentioned before.

    An explanation would be that the email2 textfield is not in the same timeline that you send the variables from.

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

  8. #48
    Senior Member
    Join Date
    Feb 2004
    Location
    British Columbia, Canada
    Posts
    119
    How do you get Flash to send CheckBoxes and List Boxes choices?

  9. #49
    Senior Member
    Join Date
    Feb 2004
    Location
    British Columbia, Canada
    Posts
    119
    Via a PHP mail form

  10. #50
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    I have never used the built in boxes unfortunately. But to send all variables from the current timeline you would use...

    this.loadVariables("script.php","POST");

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

  11. #51
    Senior Member
    Join Date
    Feb 2004
    Posts
    494

    ..

    pellepiano,


    I checked and name,company and email2 are on layer 35 message is on layer 37 all seem to be on the timeline. Is there another way to check?

  12. #52
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    Maybe you gave the textfields instance names instead of variable names.

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

  13. #53
    Senior Member
    Join Date
    Feb 2004
    Posts
    494

    ..

    They all have just var names for"name,company and email" but message has a var and instance name.

    I removed the instance name and still same thing.
    Last edited by tim_ver; 11-02-2004 at 02:09 PM.

  14. #54
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    I dont know what it could be unfortunately.

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

  15. #55
    Senior Member
    Join Date
    Feb 2004
    Posts
    494

    ..

    Ok i have played with it a little and got it to send again but I get this.

    Input is 1,2,3,4

    name: 1
    email: 3
    company: 2
    message: Name=1
    Company=2
    email2=
    message=


    name: 1
    company: 2
    email: 3
    message: 4


    Seems it is doubling up somewhere.

    Ideas?

    Php script is:

    <?php
    $email = "support@mainsite.com";
    $subject = $HTTP_POST_VARS['subject'];
    $message = $HTTP_POST_VARS['message'];
    mail($email,$subject,$message);
    echo "mailstatus=The mail has been sent!&thescript=done&";
    ?>

  16. #56
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    I dont get your description.

    Whats the code on the submit button?

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

  17. #57
    Senior Member
    Join Date
    Feb 2004
    Posts
    494

    ..

    on (release) {
    subject = "Testing Mail";
    message="Name="+name+newline+"Company="+company+ne wline+"email2="+email2+newline+"message="+message+ newline;
    this.loadVariables("simplemail.php","POST");
    mailstatus="Message being processed";}

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