empty email from a flash form

Discussion in 'HTML / PHP / JavaScript / CSS' started by pablo, Mar 7, 2006.

  1. my problem is this,
    I´m using a simple (2 textfields) flash form so my visitors can send me an email to my main address.
    I using a simple php mail script to do this, but I get an empty message, only the subject of the message that is set in the php script and nothing in the 'body'.

    The crazy thing about this is that only happens when y use an swf file to send the data to the php script, If I use an html form the mail arrives perfectly.
    I test the same files on other servers and the flash form works just fine...I don´t understand.
    Is there any server restriction about swf files ?
    the same happens with asp script...

    does anybody knows some about It?
     
  2. there aren't any restrictions on flash files.

    it is bizzare that it is working differently on one server than it does on ours. try checking the name of the body field in the flash file and making sure they match the variable name in the php file. also try renaming the variable to something else.


    Joel Thoms
    DiscountASP.NET
    http://www.DiscountASP.NET
     
  3. Yes, is realy bizzare, the files are located in the forlder /pabloberar1/formtest
    the .fla file is also there if you want to check it out.

    Can you test it with any other email account ? so I can be sure that I'm not doing nothing wrong

    tanks for the help

    tanti grazie
     
  4. ++ This is the php code:

    <?
    $MailTo = '[email protected]';

    // subject
    $MailSubject = ' Message from my site';

    //'from'
    $MailHeader = 'From: $email';

    // body ::::::::::::::::::::

    $MailBody = 'nombre: $name\r\n';

    $MailBody .= 'Family Name: $faname\r\n';

    $MailBody .= 'City: $city\r\n';

    $MailBody .= 'Country: $country\r\n';

    $MailBody .= 'E-mail: $email\r\n';

    $MailBody .= 'I know Mussa Phelps by a: $how\r\n';

    $MailBody .= 'Recieve information?: $queresinfo\r\n';

    $MailBody .= 'Message: $message\r\n';

    // send >>>>

    mail($MailTo, $MailSubject, $MailBody, $MailHeader);
    ?>




    ++ This is the ActionScript code from the flash buton:




    on (release) {
    if ((email.indexOf('@') != -1) && (email.indexOf('.') != -1) &&

    (length(email)>5)) {
    loadVariablesNum('mailoso.php', 0, 'POST');
    name = '';
    faname = '';
    city = '';
    email = '';
    country = '';
    how = '';
    message = '';
    _root.ansu._visible=true ;
    _root.ansu.answer = 'Tanks '+quien+','+'
    your message has been

    sent.';
    _root.ansu.gotoAndPlay(2) ;
    } else {
    email = ' Ø Invalid e-mail address.';
    }
    }




    I tested with other 4 webhosting companies running Linux and works perfect, but
    where the email that I recieve from the form is 'empty', only the subject is ok.

    Is like the flash it could pass the variable to the php file I don't know why


    thanks for the aid
     
  5. Bruce

    Bruce DiscountASP.NET Staff

    we can't get access to your site.

    Can you post the code?

    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     

Share This Page