Visualizzazione dei risultati da 1 a 2 su 2
  1. #1
    Utente di HTML.it
    Registrato dal
    Jan 2003
    Messaggi
    1,100

    modificare sendermail in php

    Ciao!
    ho un form che invia in automatico i dati inseriti via mail all'utente che deve gestire queste info
    nel form c'è la possibilità di aggiungere dei campi tramite un comando in JS; questa è la pagina:
    http://www.omniaracing.it/modulo_ord...ulo_ordini.htm


    l'invio del form è assicurato da uno script in php, il cui codice è questo:
    codice:
    <?php
    
    
    //this is kinda plain english
    //basicly it check's the recipient address...if you where wondering what it does
    
    // $recipient_in = split(',',$recipient);
    //for ($i=0;$i<count($recipient_in);$i++) {
    //   $recipient_to_test = trim($recipient_in[$i]);
    //   if (!eregi("^[_\\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\\.)+[a-z]{2,3}$", $recipient_to_test)) {
    //      print_error("I NEED A VALID RECIPIENT EMAIL ADDRESS ($recipient_to_test) TO CONTINUE");
    //   }
    //S}
    //change require to required
    if ($required)
       $require = $required;
    
    if ($require) {
    //this is kinda plain english
       $require = ereg_replace( " +", "", $require);
       $required = split(",",$require);
       for ($i=0;$i<count($required);$i++) {
          $string = trim($required[$i]);
          if((!(${$string})) || (!(${$string}))) {
             if ($missing_fields_redirect) {
                header ("Location: $missing_fields_redirect");
                exit;
             }
             $require;
             $missing_field_list .= "You Did Not Enter: $required[$i]
    \n";
          }
    
    /* for php programmers only
     if variables are'nt gettin sent you can just
     uncomment this line and include this code which will get all variables sent
     in the form and put them all in the message variable */
     
     //$message = parse_form($HTTP_POST_VARS);
     
     /* if underscore's dont appear, put them in, its just may editor is SHIT */
     
     /*
     i dont use this because i need some variables and its not very reliable this was used in v1.0 & v1.1 */
    
    		  }
    }
    
    //if no subject use $othersub
    if (!$subject)
       $subject = "$othersub";
    //if no $othersub & no $subject use form submission as subject
       else if ((!$othersub) && (!$subject))
       $subject = "Form Submission";
    
    //Send E-mail
    //other = if you added a extra field to the form call them other - other4
    // dont worry bout the $other variables if you dont have them in the form nothing will show in the email
    
    mail("$recipient","$subject","
    
    -- Messaggio inviato tramite il modulo contatti --
    Da:
    $name
    
    e-mail:
    $email
    
    Telefono:
    $telefono
    
    
    
    Quantità:
    $campo_uno
    Modello:
    $campo_due
    Descrizione:
    $campo_tre
    
    
    ","From: $name <$email>");
    // END send e-mail
    
    
    // INVIO DELLA MAIL
    if(@mail($to, $subject, $body, $headers)) { // SE L'INOLTRO E' ANDATO A BUON FINE...
    
    header("location: conferma.htm"); 
    
    } else {// ALTRIMENTI...
    
    header("location: problema.htm"); 
    
    }
    
    ?>
    se aggiungo delle nuove righe alla tabella per includere nuovi prodotti il form che arriva via mail conterrà solo il primo prodotto inserito, mentre gli altri prodotti non vengono includi nella mail....come posso fare per risolvere il problema?
    :master:
    ufino

  2. #2
    Utente di HTML.it
    Registrato dal
    Jan 2003
    Messaggi
    1,100
    UP!
    ufino

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.