Visualizzazione dei risultati da 1 a 6 su 6
  1. #1

    mail form con flash e php

    ciao,
    ho fatto un mail form in flash e ho un problema che non riesco a risolvere. quando la mail arriva al destinatario del form non mi compare una delle variabili: sender_message.

    Qualcuno mi può aiutare?

    questo qua sotto è il listato del file .php. potrebbe essere questo file o il .fla che da problemi?



    ciao e grazie


    <?
    if(!empty($HTTP_POST_VARS['sender_mail']
    ) || !empty($HTTP_POST_VARS['sender_message']
    ) || !empty($HTTP_POST_VARS['sender_subject']
    ) || !empty($HTTP_POST_VARS['sender_cell']) || !empty($HTTP_POST_VARS['sender_name']))
    {
    $to = "info@pippo.com";
    $subject = stripslashes($HTTP_POST_VARS['sender_sub
    ject']);
    $body = stripslashes($HTTP_POST_VARS['sender_mes
    sage']);
    $body = stripslashes($HTTP_POST_VARS['sender_cel
    l']);
    $body .= "\n\n---------------------------\n";
    $body .= "Mail inviata da: " . $HTTP_POST_VARS['sender_name'] . " <" . $HTTP_POST_VARS['sender_mail'] . ">\n";
    $header = "From: " . $HTTP_POST_VARS['sender_name'] . " <" . $HTTP_POST_VARS['sender_mail'] . ">\n";
    $header .= "Reply-To: " . $HTTP_POST_VARS['sender_name'] . " <" . $HTTP_POST_VARS['sender_mail'] . ">\n";
    $header .= "X-Mailer: PHP/" . phpversion() . "\n";
    $header .= "X-Priority: 1";
    if(@mail($to, $subject, $body, $header))
    {
    echo "output=sent";
    } else {
    echo "output=error";
    }
    } else {
    echo "output=error";
    }
    ?>
    spidermassi

  2. #2
    up
    spidermassi

  3. #3
    spidermassi

  4. #4
    Utente di HTML.it L'avatar di and80
    Registrato dal
    Mar 2003
    Messaggi
    15,182

    Re: mail form con flash e php

    sarebbe PHP ma comunque...

    non ricordo la sintassi, comunque è probabile che l'errore sia in flash e lo script in PHP semplicemente non lo vede
    dovresti sostituire "||" con "&&" se li vuoi tutti, perchè tutti devono essere verificati come pieni, così come hai fatto verifichi solo che se "almeno" uno di questi non è vuoto allora vai avanti
    codice:
    <? 
    if(!empty($HTTP_POST_VARS['sender_mail']
    ) && !empty($HTTP_POST_VARS['sender_message']
    ) && !empty($HTTP_POST_VARS['sender_subject']
    ) && !empty($HTTP_POST_VARS['sender_cell']) && !empty($HTTP_POST_VARS['sender_name'])) 
    { 
    $to = "info@pippo.com"; 
    $subject = stripslashes($HTTP_POST_VARS['sender_sub
    ject']); 
    $body = stripslashes($HTTP_POST_VARS['sender_mes
    sage']); 
    $body = stripslashes($HTTP_POST_VARS['sender_cel
    l']); 
    $body .= "\n\n---------------------------\n"; 
    $body .= "Mail inviata da: " . $HTTP_POST_VARS['sender_name'] . " <" . $HTTP_POST_VARS['sender_mail'] . ">\n"; 
    $header = "From: " . $HTTP_POST_VARS['sender_name'] . " <" . $HTTP_POST_VARS['sender_mail'] . ">\n"; 
    $header .= "Reply-To: " . $HTTP_POST_VARS['sender_name'] . " <" . $HTTP_POST_VARS['sender_mail'] . ">\n"; 
    $header .= "X-Mailer: PHP/" . phpversion() . "\n"; 
    $header .= "X-Priority: 1"; 
    if(@mail($to, $subject, $body, $header)) 
    { 
    echo "output=sent"; 
    } else { 
    echo "output=error"; 
    } 
    } else { 
    echo "output=error"; 
    } 
    ?>

  5. #5
    ciao grazie x la risposta,
    ho messo gli && al posto di || ma ancora non mi compare il valore sender_message nella mail..
    inizio a pensare che ci sia qualcosa nel flash a sto punto
    spidermassi

  6. #6
    sono riuscito a far funzionare il tutto (qualcuno dal cielo mi ha guidato) alla fine direi che nn era il flash a dare problemi.
    qua sotto metto il listato php corretto (o meglio funzionante...)
    ciao

    <?
    if(!empty($HTTP_POST_VARS['sender_mail']) && !empty($HTTP_POST_VARS['sender_message']) && !empty($HTTP_POST_VARS['sender_subject']) && !empty($HTTP_POST_VARS['sender_cell']) && !empty($HTTP_POST_VARS['sender_name']))
    {
    $to = "info@pippo.com";
    $subject = stripslashes($HTTP_POST_VARS['sender_subject']);
    $body .= "cell num: " . $HTTP_POST_VARS['sender_cell'] . "\n";
    $body .= "num persone: " . $HTTP_POST_VARS['sender_message'];
    $body .= "\n\n---------------------------\n";
    $body .= "Mail inviata da: " . $HTTP_POST_VARS['sender_name'] . " <" . $HTTP_POST_VARS['sender_mail'] . ">\n";
    $header = "From: " . $HTTP_POST_VARS['sender_name'] . " <" . $HTTP_POST_VARS['sender_mail'] . ">\n";
    $header .= "Reply-To: " . $HTTP_POST_VARS['sender_name'] . " <" . $HTTP_POST_VARS['sender_mail'] . ">\n";
    $header .= "X-Mailer: PHP/" . phpversion() . "\n";
    $header .= "X-Priority: 1";
    if(@mail($to, $subject, $body, $header))
    {
    echo "output=sent";
    } else {
    echo "output=error";
    }
    } else {
    echo "output=error";
    }
    ?>
    spidermassi

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.