Advertisement
blackimpala

contact_form_building

Mar 4th, 2024
819
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.82 KB | None | 0 0
  1. <!-- Contact Start -->
  2.         <div class="container-xxl py-5" id="contact">
  3.             <div class="container py-5 px-lg-5">
  4.                 <div class="text-center wow fadeInUp" data-wow-delay="0.1s">
  5.                     <h5 class="text-primary-gradient fw-medium">Contact Us</h5>
  6.                     <h1 class="mb-5">Get In Touch!</h1>
  7.                 </div>
  8.                 <div class="row justify-content-center">
  9.                     <div class="col-lg-9">
  10.                         <div class="wow fadeInUp" data-wow-delay="0.3s">
  11.                           <?php
  12.                           // Form submission script
  13.                             include_once 'form_submit.php';
  14.  
  15.                             // Print form errors
  16.                             if(!empty($errors)) {
  17.                                 echo "<ul class='errors'>";
  18.                                 foreach($errors as $error) {
  19.                                     echo "<li>".$error."</li>";
  20.                                 }
  21.                                 echo "</ul>";
  22.                             }
  23.  
  24.                             //Print success message
  25.                             if(!empty($response)) {
  26.                                 echo "<ul class='success'>";
  27.                                 foreach($response as $res) {
  28.                                     echo "<li>".$res."</li>";
  29.                                 }
  30.                                 echo "</ul>";
  31.                             }
  32.  
  33.                           ?>
  34.                             <form action="" method="post">
  35.                                 <div class="row g-3">
  36.                                     <div class="col-md-6">
  37.                                         <div class="form-floating">
  38.                                             <input type="text" class="form-control" id="fullname" name="fullname" placeholder="Your Name">
  39.                                             <label for="fullname">Your Full Name</label>
  40.                                         </div>
  41.                                     </div>
  42.                                     <div class="col-md-6">
  43.                                         <div class="form-floating">
  44.                                             <input type="email" class="form-control" id="email" name="email" placeholder="Your Email">
  45.                                             <label for="email">Your Email</label>
  46.                                         </div>
  47.                                     </div>
  48.                                     <div class="col-12">
  49.                                         <div class="form-floating">
  50.                                             <input type="text" class="form-control" id="subject" name="subject" placeholder="Subject">
  51.                                             <label for="subject">Subject</label>
  52.                                         </div>
  53.                                     </div>
  54.                                     <div class="col-12">
  55.                                         <div class="form-floating">
  56.                                             <textarea class="form-control" placeholder="Leave a message here" id="message" name="message" style="height: 150px"></textarea>
  57.                                             <label for="message">Message</label>
  58.                                         </div>
  59.                                     </div>
  60.                                     <div class="col-12 text-center">
  61.                                         <button class="btn btn-primary-gradient rounded-pill py-3 px-5" type="submit" id="button" name="submit">Send</button>
  62.                                     </div>
  63.                                 </div>
  64.                             </form>
  65.                         </div>
  66.                     </div>
  67.                 </div>
  68.             </div>
  69.         </div>
  70.         <!-- Contact End -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement