📁 File Manager
Editing:
/home/u882412079/domains/birdbyteweb.com/public_html/test_from.php
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Contact Form</title> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css"> <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> </head> <body> <div class="container mt-5"> <h2>Contact Us</h2> <form id="contactForm"> <div class="mb-3"> <label for="name" class="form-label">Name</label> <input type="text" class="form-control" id="name" name="name" required> </div> <div class="mb-3"> <label for="email" class="form-label">Email</label> <input type="email" class="form-control" id="email" name="email" required> </div> <div class="mb-3"> <label for="phone" class="form-label">Phone</label> <input type="text" class="form-control" id="phone" name="phone" required> </div> <button type="submit" class="btn btn-primary">Submit</button> </form> <div id="responseMessage" class="mt-3"></div> </div> <script> $(document).ready(function() { $("#contactForm").submit(function(e) { e.preventDefault(); $.ajax({ url: "process_form.php", type: "POST", data: $(this).serialize(), success: function(response) { $("#responseMessage").html(response); $("#contactForm")[0].reset(); }, error: function() { $("#responseMessage").html('<div class="alert alert-danger">Something went wrong. Please try again later.</div>'); } }); }); }); </script> </body> </html>
Save
Cancel