title: How to submit a contact form via custom button using "href" code?
body: <p>For my website I'm working on a contact form, which works. But I want the submit button to be like other buttons on my site, meaning I want it to be styled like the code below.</p>
  
  <p>However, I can't get it to submit via a "href" code. </p>
  
  <p>I've tried applying answers on similar questions but haven't had any luck.
  Any help would be greatly appreciated! </p>
  
  <p><strong>THE STYLE FOR THE SUBMIT BUTTON I WANT TO USE:</strong></p>
  
  <pre><code>&lt;div class="section-buttons"&gt;   
  &lt;p class="button layer" data-depth="0.10" &gt;&lt;a href = "I WANT THIS TO SUBMIT THE FORM"       
  class="y1 knop roll swing"&gt;&lt;span class="g1"&gt;SUBMIT&lt;/span&gt;&lt;span class="g2"&gt;SUBMIT&lt;/span&gt;  
  &lt;/a&gt;&lt;/p&gt;     
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>THE FORM CODE:</strong></p>
  
  <pre><code>&lt;form action="form.php" method="post" enctype="multipart/form-data"&gt;
  
  
          &lt;label&gt;&lt;/label&gt;
          &lt;input name="name" required placeholder="Name"&gt;
  
  
          &lt;label&gt;&lt;/label&gt;
          &lt;input name="email" type="email" required placeholder="E-mail"&gt;
  
  
          &lt;label&gt;&lt;/label&gt;
          &lt;textarea name="message" cols="20" rows="5" required placeholder="Message"&gt; 
          &lt;/textarea&gt;
  
          &lt;input id="submit" name="submit" type="submit" value="Submit"&gt;
  
  &lt;/form&gt;
  </code></pre>
  
  <p><strong>EDIT:</strong></p>
  
  <p>Thanks a lot for the quick replies. Really appreciated.
  Celt, your solution definitely brings me close to the solution.</p>
  
  <p>It does indeed bring me to the form.php but it doesn't seem to submit the actual data to an email address.</p>
  
  <p>Could it be that my PHP file (forms.php) does something wrong with the new code? I'm guessing the last part "if ($_POST['submit'])" doesn't quite work with this new approach? Any help?</p>
  
  <p>Sorry for the noobness. </p>
  
  <pre><code>&lt;?php
  $name = $_POST['name'];
  $email = $_POST['email'];
  $message = $_POST['message'];
  $from = 'From: website.com'; 
  $to = 'email@email.com'; 
  $subject = 'Email Inquiry';
  
  $body = "From: $name\n E-Mail: $email\n Message:\n $message";
  ?&gt;
  
  &lt;?php
  if ($_POST['submit']) {
  if (mail ($to, $subject, $body, $from)) { 
  echo '&lt;p&gt;Thank you for your email!&lt;/p&gt;';
  } else { 
      echo '&lt;p&gt;Oops! An error occurred. Try sending your message  
  again.&lt;/p&gt;'; 
  }
  }
  ?&gt;
  </code></pre>