How can I use OOP PHP in this contact form? : <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-html lang-html prettyprint-override"><code>        &lt;div class="form"&gt;
          &lt;div id="errormessage"&gt;&lt;/div&gt;
          &lt;form action="" method="post" role="form" class="contactForm"&gt;
            &lt;div class="form-row"&gt;
              &lt;div class="form-group col-md-6"&gt;
                &lt;input type="text" name="name" class="form-control" id="name" placeholder="Your Name" data-rule="minlen:4" data-msg="Please enter at least 4 chars" /&gt;
                &lt;div class="validation"&gt;&lt;/div&gt;
              &lt;/div&gt;
              &lt;div class="form-group col-md-6"&gt;
                &lt;input type="email" class="form-control" name="email" id="email" placeholder="Your Email" data-rule="email" data-msg="Please enter a valid email" /&gt;
                &lt;div class="validation"&gt;&lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;
            &lt;div class="form-group"&gt;
              &lt;input type="text" class="form-control" name="subject" id="subject" placeholder="Subject" data-rule="minlen:4" data-msg="Please enter at least 8 chars of subject" /&gt;
              &lt;div class="validation"&gt;&lt;/div&gt;
            &lt;/div&gt;
            &lt;div class="form-group"&gt;
              &lt;textarea class="form-control" name="message" rows="5" data-rule="required" data-msg="Please write something for us" placeholder="Message"&gt;&lt;/textarea&gt;
              &lt;div class="validation"&gt;&lt;/div&gt;
            &lt;/div&gt;
            &lt;div class="text-center"&gt;&lt;button type="submit" name="btnsubmit"&gt;Send Message&lt;/button&gt;&lt;/div&gt;
          &lt;/form&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/section&gt;</code></pre>
</div>
</div>
</p>

<p>This is the contact for I have database name msolution and table user 
how can I use OOP PHP for this contact form 
Please if any one can help me in this by providing the code and thank you for your help </p>
