Navigazione

    Privacy - Termini e condizioni
    © 2020 Search On Media Group S.r.l.
    • Registrati
    • Accedi
    • CATEGORIES
    • Discussioni
    • Non letti
    • Recenti
    • Hashtags
    • Popolare
    • Utenti
    • Stream
    • Interest
    • Categories
    1. Home
    2. stra
    3. Post
    S

    stra

    @stra

    • Profilo
    • Chi segue 0
    • Da chi è seguito 0
    • Discussioni 2
    • Post 2
    • Migliore 0
    • Gruppi 0
    Iscrizione Ultimo Accesso
    Località Lontano
    0
    Reputazione
    2
    Post
    0
    Visite al profilo
    0
    Da chi è seguito
    0
    Chi segue
    User Newbie

    Post creati da stra

    • Problema form....

      Buongiorno ho un form che mi manda nome cognome telefono mail e messaggio a un indirizzo mail allego codice:

      <?php     $emailTo = '[email protected]';
          if($subject!=""){
          $subject =$_REQUEST['subject'];
          }else{
          $subject = 'Richiesta informazioni dal sit';
          }
          $name=$_REQUEST['name'];
          $telefono=$_REQUEST['telefono'];
          $email=$_REQUEST['email'];
          $msg=$_REQUEST['msg'];
          
          $body = "Nome: $name \n\nEmail: $email \n\nTelefono: $telefono \n\nMessaggio: $msg \n\n ";
          $headers = 'From: '.$name.' <'.$email.'>' . "\r\n" . 'Reply-To: ' . $email;
          
          mail($emailTo, $subject, $body, $headers);
      ?>
      

      e il codice in js

      jQuery(function() {  jQuery('.error').hide();
        jQuery(".button").click(function() {
      
      
          jQuery('.error').hide();
              
            var name = jQuery("input#name").val();
              if (name == "") {
            jQuery("span#name_error").show();
            jQuery("input#name").focus();
            return false;
          }
            var telefono = jQuery("input#telefono").val();
              if (telefono == "") {
            jQuery("span#telefono_error").show();
            jQuery("input#telefono").focus();
            return false;
          }    
           
          if((isNaN(telefono))) {
          jQuery("span#telefono_error2").show();
          jQuery("input#telefono").focus();
            return false;
          }
       
            var email = jQuery("input#email").val();
            if (email == "") {
            jQuery("span#email_error").show();
            jQuery("input#email").focus();
            return false;
          }
          
          var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;
          if(!emailReg.test(email)) {
          jQuery("span#email_error2").show();
          jQuery("input#email").focus();
            return false;
          }
          var subject = jQuery("input#subject").val();
          
            var msg = jQuery("textarea#msg").val();
            if (msg == "") {
            jQuery("span#msg_error").show();
            jQuery("textarea#msg").focus();
            return false;
          }
              
              var dataString = 'name='+ name + '&email=' + email +  '&telefono=' + telefono + '&subject=' + subject + '&msg=' + msg;
      
      
              
            jQuery.ajax({
            type: "POST",
            url: "process.php",
            data: dataString,
            success: function() {
              jQuery('#contactform').html("<div id='message' class='ten columns'></div>");
              jQuery('#message').html("<strong>La vostra richiesta è stata inviata!</strong>")
              .append("<p>Vi ricontatteremo il prima possibile.</p>")
              .hide()
              .fadeIn(1500, function() {
                jQuery('#message');
              });
            }
           });
          return false;
          });
      });
      
      
      
      

      il mio problema e' che il telefono non mi compare nella mail di ritorno..... qualcuno puo' aiutarmi? sto impazendo:x
      grazie mille!

      postato in Coding
      S
      stra
    • Buongiorno a tutti....

      Save a tutti, spero di riuscire a risolvere i miei problemi con le vostre condivisioni... ^_^:D

      postato in Presentati alla Community
      S
      stra