A Flash Developer Resource Site

Page 2 of 3 FirstFirst 123 LastLast
Results 21 to 40 of 57

Thread: small Form

  1. #21
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    Maybe its this board, but your php script misses the <? part in the beginning.

    Othersise I think it would work. You wont get any message in the mail though as you dont sen any. You would just see the subject and nothing more.

    You will need to tell php which variables should be displayed as a message ( or do that in Flash , making up the contents of the message part ).

    Are you shure you have the right adress to the php script because I get a Page Not Found when I try to get it.

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

  2. #22
    Senior Member
    Join Date
    Feb 2004
    Posts
    494

    ..

    Yes it is on a closed server. When you posted this: (Maybe its this board, but your php script misses the ) what did you mean, looks like it did not all comeout. What did you mean by display variables? Am I missing lines in the php code for this?

    Thanks

  3. #23
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    I meant the php start tag ( you couldnt see it as the board dont show tags like that if you dont do like....
    code:
     <? 



    Message is the variable that will show as a message in your mail ( just as subject shows as subject ). But the email program has no idea where to place a variable called "name" if you dont tell it where.

    In Flash you can first declare that

    message="My name is"+name+"and my email is "+email;

    Then those variables and lines wil get in the mesage part of the email.

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

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

    ..

    Ok I think I got it so in flash for the button script I can just add those lines like this.

    on (release) {
    subject = "Testing Mail";
    this.loadVariables("http://www.main.com/testthis/simplemail.php", "POST");
    } message="My name is"+name+"and
    my company is"+company"and my email is"+email2" and message
    is"+message";


    And this will fix it?

  5. #25
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    Yes , but it has to be before you send the variables.

    on (release) {
    subject = "Testing Mail";
    message="My name is"+name+"and
    my company is"+company"and my email is"+email2" and message
    is"+message";
    this.loadVariables("http://www.main.com/testthis/simplemail.php", "POST");
    }

    It will just fix getting all variables you want into the message part of the email.

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

  6. #26
    Senior Member
    Join Date
    Jul 2004
    Posts
    105
    Hey everyone,

    Isn't there an easier way to create a mailform. I am not a programmer, and I can design websites using basic flash techics and some HTML.

    I am able to create a form using HTML which uses the clients e-mail program to send out the information, but the thing with that is it pulls up an alert telling the client that an outside program is trying to use a program on your computer, do you want to allow this?

    I feel doing it that way may scare the people using the form.

    So again, without having to figure out where the code goes into flash is there an easier way?

  7. #27
    Senior Member
    Join Date
    Feb 2004
    Posts
    494

    ...

    pellepiano

    If you put into my form and script your website info dose it work for you? If so and you can fix it to work for you let me know if not reload here with changes and fixes please.
    I need to get this up and running in two days.

    Thanks

  8. #28
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    Had no problems at all, using your file and the simple script.....

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



    Using the one you change did not work. Can not say why.
    The mailstatus worked too in above script.

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

  9. #29
    Senior Member
    Join Date
    Feb 2004
    Posts
    494

    ...

    ok so you used this:

    on (release) {
    subject = "Testing Mail";
    message="My name is"+name+"and
    my company is"+company"and my email is"+email2" and message
    is"+message";
    this.loadVariables("http://www.main.com/testthis/simplemail.php", "POST");
    }

    in the button action also, or something else?

    is it possible for you to up the .fla how you did it, and worked?

    Thanks

  10. #30
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    I think its the php that gives you trouble...

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

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

    ..

    what do you use? php right?

  12. #32
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    Yes, the same scripts as we used in this thread.

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

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

    ..

    Ok, I tried it out. it says message being processed. And sites there, never get an e-mail and I can not add text in the message box it shows as a bitmap and not a input text, weird. man my stuff is messed up I guess. arghh.

    Simplemail.php =

    <?php
    $email ="support@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&";
    ?>

    Ok I did see that it is taking name,company and e-mail and putting them in the message box when I hit send it does not e-mail it it just parses the infor in the message box if I use message and type in 1 for name 2 for comapny 3 for email and 4 for message and hit send I get 1234 in the message box and th is it.
    Last edited by tim_ver; 10-27-2004 at 02:07 PM.

  14. #34
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    The message box does not show properly as I have only MX. But that wont stop it from sending the mail. Im not shure what the problem is on your side though.

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

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

    ..

    updated above.

  16. #36
    Senior Member
    Join Date
    Feb 2004
    Posts
    494

    ..

    Fixed the issue with posting vars in message box but still no e-mails.
    arghhh.


    Ok, so it has to be some small detail I am missing I am sure.
    Last edited by tim_ver; 10-27-2004 at 02:34 PM.

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

    clear all

    What is the action to give the clear button to clear out the text in the fields?

    Thanks

  18. #38
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    on(release){
    name="";
    company="";
    }

    ...and so on.

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

  19. #39
    Senior Member
    Join Date
    Feb 2004
    Posts
    494

    ..

    Ok cool. thanks

    Man I am not sure hy but still no e-mail.

    I there a way after they hit send and it says processed e-mail it clears fields so they know it was sent, otherwise people may keep hitting send.

  20. #40
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    You can let the php take care of that.

    echo "mailstatus=The mail has been sent!&thescript=done&name=&email2=&company=";

    ..and so on. Should work....

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

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