title: Php form is not working on the specific server
body: <p>I have the form using php script, its working fine on other server however i got the problem on the live one. below i have mention the details:</p>
  
  <p>the contact form send by using ajax call &amp; php. its working on the two servers i have checked, one of them linked below
  <a href="http://www.virtualmob.co.uk/products/test_landing_pages/UrbanSpot/contact.html" rel="nofollow">http://www.virtualmob.co.uk/products/test_landing_pages/UrbanSpot/contact.html</a></p>
  
  <p>however the same form when i upload it on the live server its not working  i dont know why?? :( live linked below:
  <a href="http://www.urban-spot.co.uk/contact.html" rel="nofollow">http://www.urban-spot.co.uk/contact.html</a></p>
  
  <p>the php is installed on the server, kindly let me know if any thing necessary is switched off in the server, here is the php info link:</p>
  
  <p><strong>Here is the php code</strong></p>
  
  <pre><code>&lt;?php
  
  
  // Change this with your blog name and email address
  $the_blogname   = 'MobilityApp';
  $the_myemail    = 'info@urban-spot.co.uk';
  
  
  if(isset($_POST['email'])){
      error_reporting(0); 
      $errorC = false;
  
      $the_email      = $_POST['email'];
      $the_name       = $_POST['yourname'];
      $the_message    = $_POST['message'];
  
      $the_phone      = $_POST['phone'];
      $the_fax        = $_POST['fax'];
      $the_company    = $_POST['company'];
      $the_website    = $_POST['website'];
  
      # want to add aditional fields? just add them to the form in template_contact.php,
      # you dont have to edit this file
  
      //added fields that are not set explicit like the once above are combined and added before the actual message
      $already_used = array('email','yourname','message','phone','fax','company','website','myblogname','tempcode','temp_url','ajax');
      $attach = '';
  
      foreach ($_POST as $key =&gt; $field)
      {
          if(!in_array($key,$already_used))
          {
              $attach.= $key.": ".$field."&lt;br /&gt; \n";
          }
      }
      $attach.= "&lt;br /&gt; \n";
  
      if(!checkmymail($the_email))
      {
          $errorC = true;
          $the_emailclass = "error";
      }else{
          $the_emailclass = "valid";
          }
  
      if($the_message == "")
      {
          $errorC = true;
          $the_messageclass = "error";
      }else{
          $the_messageclass = "valid";
          }
  
      if($errorC == false)
      {   
          $to      =  $the_myemail;
          $subject = "New Message from " . $the_blogname;
          $header  = 'MIME-Version: 1.0' . "\r\n";
          $header .= 'Content-type: text/html; charset=utf-8' . "\r\n";
          $header .= 'From:'. $the_email  . " \r\n";
  
          $message1 = nl2br($the_message);
  
          if(!empty($the_name))       $the_name       = "Name:    $the_name &lt;br/&gt;";
          if(!empty($the_company))    $the_company    = "Company: $the_company &lt;br/&gt;";
          if(!empty($the_phone))      $the_phone      = "Phone:   $the_phone &lt;br/&gt;";
          if(!empty($the_fax))        $the_fax        = "Fax:     $the_fax &lt;br/&gt;";
          if(!empty($the_website))    $the_website    = "Website: $the_website &lt;br/&gt;";
  
          $message = "
          You have a new message! &lt;br/&gt;
          $the_name
          $the_company
          $the_phone
          $the_website
  
          $attach &lt;br /&gt;
  
          Message: $message1 &lt;br /&gt;";
  
  
  
          if(@mail($to,$subject,$message,$header)) $send = true; else $send = false;
  
          if(isset($_POST['ajax'])){
  
          if ($send)
          echo '&lt;h3&gt;&lt;img src="images/icon_check.png"&gt;&amp;nbsp;&amp;nbsp;Your message has been sent!&lt;/h3&gt;&lt;div class="confirm"&gt;
  
  
                &lt;/div&gt;';
          else
          echo '&lt;h3&gt;Oops!&lt;/h3&gt;&lt;div class="confirm"&gt;
                  &lt;p class="texterror"&gt;Due to an unknown error, your form was not submitted, please resubmit it or try later.&lt;/p&gt;
                &lt;/div&gt;'; 
  
          }
      }
  
  }
  
  
  function checkmymail($mailadresse){
  $email_flag=preg_match("!^\w[\w|\.|\-]+@\w[\w|\.|\-]+\.[a-zA-Z]   {2,4}$!",$mailadresse);
  return $email_flag;
  }
  
  ?&gt; 
  </code></pre>
  
  <p><strong>For refrence i am using below ajax call</strong></p>
  
  <pre><code> function tfuse_form1(){
  
  var my_error;
  var url = jQuery("input[name=temp_url]").attr('value');
  jQuery(".ajax_form #send").bind("click", function(){
  
  my_error = false;
  jQuery(".ajax_form input, .ajax_form textarea, .ajax_form radio, .ajax_form select").each(function(i)
  {
              var surrounding_element = jQuery(this);
              var value               = jQuery(this).attr("value"); 
              var check_for           = jQuery(this).attr("id");
              var required            = jQuery(this).hasClass("required"); 
  
              if(check_for == "email"){
                  surrounding_element.removeClass("error valid");
                  baseclases = surrounding_element.attr("class");
                  if(!value.match(/^\w[\w|\.|\-]+@\w[\w|\.|\-]+\.[a-zA-Z]{2,4}$/)){
                      surrounding_element.attr("class",baseclases).addClass("error");
                      my_error = true;
                  }else{
                      surrounding_element.attr("class",baseclases).addClass("valid"); 
                  }
              }
  
              if(check_for == "name" || check_for == "message"){
                  surrounding_element.removeClass("error valid");
                  baseclases = surrounding_element.attr("class");
  
                  if(value == "" || value == 'Name (required)' || value == 'Type your message' ){ 
                      surrounding_element.attr("class",baseclases).addClass("error");
                      my_error = true;
                  }else{
                      surrounding_element.attr("class",baseclases).addClass("valid");
                  }
              }
  
              if(required &amp;&amp; check_for != "name" &amp;&amp; check_for != "email" &amp;&amp; check_for != "message"){
                  surrounding_element.removeClass("error valid");
                  baseclases = surrounding_element.attr("class");
                  if(value == ""){                    
                      surrounding_element.attr("class",baseclases).addClass("error");
                      my_error = true;
                  }else{
                      surrounding_element.attr("class",baseclases).addClass("valid"); 
                  }
              }
  
  
              if(jQuery(".ajax_form input, .ajax_form textarea, .ajax_form radio, .ajax_form select").length  == i+1){
                      if(my_error == false){
                          jQuery(".ajax_form").slideUp(400);
  
                          var $datastring = "ajax=true";
                          jQuery(".ajax_form input, .ajax_form textarea, .ajax_form radio, .ajax_form select").each(function(i)
                          {
                              var $name = jQuery(this).attr('name');  
                              var $value = encodeURIComponent(jQuery(this).attr('value'));
                              $datastring = $datastring + "&amp;" + $name + "=" + $value;
                          });
  
  
                          jQuery(".ajax_form #send").fadeOut(100);    
  
                          jQuery.ajax({
                             type: "POST",
                             url: "./sendmail.php",
                             data: $datastring,
                             success: function(response){
                                 jQuery(".ajax_form").before("&lt;div class='ajaxresponse'&gt;&lt;/div&gt;");
                                 jQuery(".ajaxresponse").html(response).slideDown(400); 
                                 jQuery(".ajax_form #send").fadeIn(400);
                                 jQuery(".ajax_form input, .ajax_form textarea, .ajax_form radio, .ajax_form select").val("");
                              }
                          });
                      } 
                  }
          });
          return false;
  });
  }
  </code></pre>