title: HTML form with external php form processing?
body: <p>Below I have my html and php coding. I've racked my brain trying several different options, but what I am really looking for is something simple and secure that either reloads to my original page showing sent message. As of right now I get this error message when submitting my form. Someone please point me in the right direction, any feedback is appreciated.</p>
  
  <p>HTML CODING(index.html)</p>
  
  <pre><code>&lt;html&gt;
    &lt;head&gt;&lt;title&gt;&lt;/title&gt;&lt;/head&gt;
    &lt;body&gt;
  
      &lt;div id="wrapper2"&gt;
        &lt;div id="newsletter" class="container"&gt;
          &lt;div class="title"&gt;
  
            &lt;img src="images/port-formdivide.png" alt="" width="800" height="60" /&gt;
  
            &lt;h2&gt;Contact Me&lt;/h2&gt;
            &lt;span class="byline"&gt;Please complete the entire form.&lt;/span&gt; &lt;/div&gt;
  
          &lt;div class="content"&gt;
            &lt;form action="form.php" method="POST" enctype="multipart/form-data" target="_self"&gt;
  
              &lt;div class="row half"&gt;
                &lt;div class="6u"&gt;
                  &lt;input name="name/company" id="name/company" type="text" class="text" maxlength="30"
                         placeholder="Name/Company" value="" /&gt;
                &lt;/div&gt;
  
                &lt;div class="6u"&gt;
                  &lt;input name="email" id="email" type="text" class="text" maxlength="30"
                         placeholder="Email" value="" /&gt;
                &lt;/div&gt;
              &lt;/div&gt;
  
              &lt;div class="row half"&gt;
                &lt;div class="12u"&gt;
                  &lt;textarea name="message" id="message" placeholder="Message" value=""&gt;&lt;/textarea&gt;
  
                &lt;/div&gt;
              &lt;/div&gt;
  
              &lt;div class="row"&gt;
                &lt;div class="12u"&gt;
                  &lt;input name="Send Message" type="submit" class="button submit" value="Send Message" /&gt;
                &lt;/div&gt;
              &lt;/div&gt;
  
            &lt;/form&gt;
  
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
  
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>PHP CODING(form.php)</p>
  
  <pre><code>&lt;?php
  // Email Variables
  $to = 'inquiries@triston-thomas.com';
  $subject = 'New Inquiry';
  
  /* Data Variables */
  if ($_POST['parse_var'] == "form"){
  
      $emailTitle = 'New Message Triston';
      $yourEmail = 'inquiries@triston-thomas.com':
  
      $name/company = $_POST['name/company'];
      $email = $_POST['email'];
      $message = $_POST['message'];
  
      echo ("Name/Company:" . $name/company);
      echo ("&lt;br /&gt;Email:" . $email);
      echo ("&lt;br /&gt;Message:" . $message);
  
      function response($name/company);
      {
          echo ("Thank You " . $name/company);
      }
  
      header ("Location: index.html");
  
      mail ($to, $subject, $message, "From: ".$name/company);
      echo "Your Inquiry Has Been Sent";
  
      // Set Required Fields
      $required_ fields = array("$name/company","$email","$message");
  
      // Set Error Messages
      $error_message = array("$name/company" =&gt; 'Please Enter Your Name or Company Name In
      The Field',
  
                             "$email" =&gt; 'Valid Email Address Is Required',
                             "$message" =&gt; 'Please Enter Message In The  Field',);
  
  
      /*Behaviors*/
      if ($_POST)
          {
              mail($to, $subject, $message, $header);
          }
  
      if(isset($_POST['message']))
          {
              echo $_POST['name/company'];
              echo "&lt;br /&gt;";
              echo $_POST['email'];
              echo "&lt;br /&gt;";
              echo $_POST['message'];
          }
  
      if(empty($_POST['name/company']))
          {
              echo "Name Field is Required";
          }
  
      if(empty($_POST['email']))
          {
              echo "Email Field is Required";
          }
  
      if(empty($_POST['message']))
          {
              echo "Message Field is Required";
          }
  
      $body = &lt;&lt;&lt;EOD
          &lt;br&gt;&lt;hr&gt;&lt;br&gt;
      Name/Company: $name/company &lt;br /&gt;
          Email: $email &lt;br /&gt;
          Message: $message &lt;br /&gt;
  
          EOD;
  
      $headers = "From: $email\r\n";
      $headers .= "Content-type: text/html\r\n";
      $success = mail("$yourEmail", "$emailTitle", "$body", "$headers");
  
      $sent = "Thank You, Your Inquiry Has Been Sent";
  
      echo $result;
  
      enter code here
  
          }
  
  ?&gt;
  </code></pre>