title: Can't connect to local MySQL server through socket Issue
body: <p>I'm creating a contact form with php. When i fill up everything and press submit it's don't send any message to specific email address. it's show several error message.</p>
  
  <p><strong>Error message:</strong></p>
  
  <pre><code>Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Can't connect 
  to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /homez.91
  /maaks/www/hotel/eng/resellers.php on line 93
  
  Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the 
  server could not be established in /homez.91/maaks/www/hotel/eng/resellers.php on line 
  93
  
  etc.....
  </code></pre>
  
  <p><strong>PHp Code:</strong></p>
  
  <pre><code>&lt;?php
          if(isset($_POST['Send']) &amp;&amp; $_POST['Send'] == "Submit")
          {
              $fname = mysql_real_escape_string($_POST['fname']);
              $email = mysql_real_escape_string($_POST['email']);
              $conum = mysql_real_escape_string($_POST['conum']);
              $country = mysql_real_escape_string($_POST['country']);
              $find = mysql_real_escape_string($_POST['find']);
              $msg = mysql_real_escape_string($_POST['msg']);
  
              $err = array();
  
  
  if(isset($fname) &amp; isset($email) &amp; isset($conum) &amp; isset($country) &amp; isset($find) &amp; 
  isset($msg))
              {
  
  if(empty($fname) &amp; empty($email) &amp; empty($conum) &amp; empty($country) &amp; empty($find) &amp; 
  empty($msg))
                  {
                      $err[] = "All field require";
                  }
                  else
                  {
                      if(empty($fname))
                      $err[] = "Your first name require";
                  }
  
              }
              else
              {
              if(!empty($err))
                {
                    foreach($err as $er)
                      {
                                 echo "&lt;font color=red&gt;$er&lt;/font&gt;&lt;br/&gt;";
                      }
                }
              else
              {
                  $to = "creativeart09@yahoo.com";
                  $subject = "Message from Customer";
                          $message = "$msg";                                              
                          $from = "$email";
                          $headers = "From:" . $from;
                          mail($to,$subject,$message,$headers);
  
                  if(mail())
                      {
  
                      echo "&lt;script&gt;";
                              header("Refresh: 0; url=Thankyou.html");
                      echo "&lt;/script&gt;";
                      }
                      else
                      {
                          echo "Something is wrong" . mysql_error();
                      }
                  }
              }
  
          }           
  
   ?&gt;
  </code></pre>
  
  <p>What is the wrong in my code?</p>