title: Sending email with data from form
body: <p>I have problem with simple contact box. I want to send informations from form to my email.</p>
  
  <p>Already tried with register globals on and off (.httacess), tried with simple $formname and $_POST['formname'] but still getting email without form info.</p>
  
  <pre><code>&lt;?php
  
          if ($action == "send"){//isset wyslij
  
  
  
  
      //if (!$name || !$email || !$phone || !$enquiry) {
          //$problem = TRUE;
         //echo("&lt;p&gt;You have to fill all form.&lt;/p&gt;");
      //}     
  
      if (!$problem){
  
  
      $name = $_POST['name'];    
      $data = date("d.m.y");
  
  
      $message = "
      &lt;p&gt;Name: $name&lt;/p&gt;
      &lt;p&gt;Phone: $phone&lt;/p&gt;
      &lt;p&gt;Email: $email&lt;/p&gt;
      &lt;br&gt;
      &lt;p&gt;Enquiry: $enquiry&lt;/p&gt;";
  
  
  $od = "blabla@email.com";
  $content = $message;
  $header = "From: $od \r\n";
  $header  .= 'MIME-Version: 1.0' . "\r\n";
  $header .= 'Content-type: text/html; charset=UTF-8' . "\r\n";
       (mail('myemail@gmail.com', 'New message from website Angelzena', $content, $header));
  
  
  
                       echo("&lt;br&gt;&lt;p&gt;Message has been sent.&lt;/p&gt;");
  
      }else{
            echo("&lt;p&gt;Try &lt;a href=contact.php&gt;again&lt;/a&gt;&lt;/p&gt;");
           }                    
  }
  
  
  ?&gt;
  
  
  
          &lt;form action="contact.php?action=send" method="post" enctype="text/plain"&gt;
          &lt;label  for="name"&gt;Name&lt;/label&gt;&lt;input type="text" name="name" /&gt;&lt;/br&gt;&lt;/br&gt;
          &lt;label  for="email"&gt;Email&lt;/label&gt;&lt;input type="text" name="email" /&gt;&lt;/br&gt;&lt;/br&gt;
          &lt;label  for="phone"&gt;Phone&lt;/label&gt;&lt;input type="text" name="phone" /&gt;&lt;/br&gt;&lt;/br&gt;
          &lt;label  for="enquiry"&gt;Enquiry&lt;/label&gt;&lt;textarea name="enquiry" cols="20" rows="10"&gt;&lt;/textarea&gt;&lt;/br&gt;&lt;/br&gt;
          &lt;input type="submit" id="contact_button" value="Send" /&gt;
          &lt;/form&gt;
  </code></pre>