<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Problema form....]]></title><description><![CDATA[<p dir="auto">Buongiorno ho un form che mi manda nome cognome telefono mail e messaggio a un indirizzo mail allego codice:</p>
<pre><code>&lt;?php     $emailTo = 'info@miamail.it';
    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.' &lt;'.$email.'&gt;' . "\r\n" . 'Reply-To: ' . $email;
    
    mail($emailTo, $subject, $body, $headers);
?&gt;
</code></pre>
<p dir="auto">e il codice in js</p>
<pre><code>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 + '&amp;email=' + email +  '&amp;telefono=' + telefono + '&amp;subject=' + subject + '&amp;msg=' + msg;


        
      jQuery.ajax({
      type: "POST",
      url: "process.php",
      data: dataString,
      success: function() {
        jQuery('#contactform').html("&lt;div id='message' class='ten columns'&gt;&lt;/div&gt;");
        jQuery('#message').html("&lt;strong&gt;La vostra richiesta è stata inviata!&lt;/strong&gt;")
        .append("&lt;p&gt;Vi ricontatteremo il prima possibile.&lt;/p&gt;")
        .hide()
        .fadeIn(1500, function() {
          jQuery('#message');
        });
      }
     });
    return false;
    });
});
</code></pre>
<p dir="auto">il mio problema e' che il telefono non mi compare nella mail di ritorno..... qualcuno puo' aiutarmi? sto impazendo:x<br />
grazie mille!</p>
]]></description><link>https://dev.connect.gt/topic/233663/problema-form</link><generator>RSS for Node</generator><lastBuildDate>Thu, 26 Nov 2026 01:37:06 GMT</lastBuildDate><atom:link href="https://dev.connect.gt/topic/233663.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 28 Feb 2018 17:17:51 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Problema form.... on Mon, 05 Mar 2018 16:24:57 GMT]]></title><description><![CDATA[<p dir="auto">if((isNaN(telefono))) {    jQuery("span#telefono_error2").show();    jQuery("input#telefono").focus();      return false;    }</p>
<p dir="auto">Questo controlla che il numero non sia nullo ma se controlli già sopra il valore non è utile.</p>
<p dir="auto">Fai un po' di prove inserendo un testo al posto del numero di telefono e vedi se passa i dati.<br />
A colpo d'occhio non mi sembra di vedere nulla di strano.<br />
Attendo novità.</p>
]]></description><link>https://dev.connect.gt/post/1246443</link><guid isPermaLink="true">https://dev.connect.gt/post/1246443</guid><dc:creator><![CDATA[portapipe]]></dc:creator><pubDate>Mon, 05 Mar 2018 16:24:57 GMT</pubDate></item></channel></rss>