PHP 8.5.2
Preview: contact.php Size: 7.78 KB
/home/serveshikshafoundation/htdocs/serveshikshafoundation.org.in/contact.php

      <?php require('header.php') ?>

<!-- start page-title -->    
        <section class="page-title">
            <div class="page-title-bg"></div>
            <div class="container">
                <div class="title-box">
                    <h1>Contact us</h1>
                    <ol class="breadcrumb">
                        <li><a href="#">Home</a></li>
                        <li class="active">Contact us</li>
                    </ol>
                </div>
            </div> <!-- end container -->
        </section>
        <!-- end page-title -->


        <!-- start contact-main-content -->
<section class="contact-main-content py-5 bg-light">
    <div class="container">
        <!-- Contact Info -->
        <div class="row text-center mb-5" style="margin-top:50px; margin-bottom:50px;">
            <div class="col-md-4 mb-4">
                <div class="p-3  rounded shadow-sm h-100" style="padding:20px !important; border-radius:10px !important; box-shadow: rgba(0, 0, 0, 0.4) 0px 2px 4px, rgba(0, 0, 0, 0.3) 0px 7px 13px -3px, rgba(0, 0, 0, 0.2) 0px -3px 0px inset; background-color:white; ">
                    <div class="mb-3  fs-3" style="color:#ff6200;">
                        <i class="fa fa-map-marker " style="font-size:50px;"></i>
                    </div>
                    <h5 class="mb-2">Address</h5>
                    <p class="mb-0"><?php echo $address ?></p>
                </div>
            </div>
            <div class="col-md-4 mb-4">
                <div class="p-3 border rounded shadow-sm h-100" style="padding:20px !important; border-radius:10px !important; box-shadow: rgba(0, 0, 0, 0.4) 0px 2px 4px, rgba(0, 0, 0, 0.3) 0px 7px 13px -3px, rgba(0, 0, 0, 0.2) 0px -3px 0px inset; background-color:white; ">
                    <div class="mb-3  fs-3" style="color:#ff6200;">
                        <i class="fa fa-envelope-o" style="font-size:50px;"></i>
                    </div>
                    <h5 class="mb-2">Email</h5>
                    <p class="mb-1"><?php echo $email ?></p>
                </div>
            </div>
            <div class="col-md-4 mb-4">
                <div class="p-3 border rounded shadow-sm h-100" style="padding:20px !important; border-radius:10px !important; box-shadow: rgba(0, 0, 0, 0.4) 0px 2px 4px, rgba(0, 0, 0, 0.3) 0px 7px 13px -3px, rgba(0, 0, 0, 0.2) 0px -3px 0px inset; background-color:white;">
                    <div class="mb-3  fs-3" style="color:#ff6200;">
                        <i class="fa fa-phone" style="font-size:50px;"></i>
                    </div>
                    <h5 class="mb-2">Phone</h5>
                    <p class="mb-1"><?php echo $phone ?></p>
                    <p class="mb-0">+91 8178853679</p>
                </div>
            </div>
        </div>

        
    </div>
</section>
<!-- end contact-main-content -->
    <style>
        body {
            background-color: #fff3e0;
            font-family: Arial, sans-serif;
        }
        .contact-container {
            max-width: 1200px;
            margin: 40px auto;
            padding: 30px;
            background-color: #ffffff;
            border-radius: 10px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
            border: 2px solid #ff6200;
        }
        h2 {
            color: #ff6200;
            text-align: center;
            margin-bottom: 20px;
        }
        .form-label {
            color: #333;
            font-weight: bold;
        }
        .form-control {
            border-color: #ff8c00;
        }
        .form-control:focus {
            border-color: #e65100;
            box-shadow: 0 0 5px rgba(230, 81, 0, 0.5);
        }
        .btn-orange {
            background-color: #ff6200;
            border-color: #ff6200;
            color: #fff;
          width:200px;
          text-align:center;
        }
        .btn-orange:hover {
            background-color: #e65100;
            border-color: #e65100;
        }
        .error {
            color: #dc3545;
            font-size: 0.875rem;
            display: none;
            margin-top: 5px;
        }
        .contact-info {
            margin-top: 20px;
            text-align: center;
            color: #333;
        }
        .contact-info p {
            margin: 5px 0;
        }
        .contact-info a {
            color: #ff6200;
            text-decoration: none;
        }
        .contact-info a:hover {
            color: #e65100;
        }
    </style>
<div class="container contact-container">
        <h2>Contact Serve Shiksha Foundation</h2>
        <form id="contactForm" action="submit_contact.php" method="POST" onsubmit="return validateForm()">
            <div class="mb-3">
                <label for="name" class="form-label">Full Name</label>
                <input type="text" class="form-control" id="name" name="name" required>
                <div class="error" id="nameError">Please enter your full name</div>
            </div>
            <div class="mb-3">
                <label for="email" class="form-label">Email Address</label>
                <input type="email" class="form-control" id="email" name="email" required>
                <div class="error" id="emailError">Please enter a valid email address</div>
            </div>
            <div class="mb-3">
                <label for="phone" class="form-label">Phone Number</label>
                <input type="tel" class="form-control" id="phone" name="phone">
                <div class="error" id="phoneError">Please enter a valid 10-digit phone number</div>
            </div>
            <div class="mb-3">
                <label for="message" class="form-label">Message</label>
                <textarea class="form-control" id="message" name="message" rows="5" required></textarea>
                <div class="error" id="messageError">Please enter your message</div>
            </div>
            <button type="submit" class="btn btn-orange w-100 mt-4" style="margin-top:5px;">Submit</button>
        </form>
       
    </div>

    <script>
        function validateForm() {
            let isValid = true;

            // Reset error messages
            document.querySelectorAll('.error').forEach(error => error.style.display = 'none');

            // Name validation
            const name = document.getElementById('name').value.trim();
            if (!name) {
                document.getElementById('nameError').style.display = 'block';
                isValid = false;
            }

            // Email validation
            const email = document.getElementById('email').value.trim();
            const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
            if (!email || !emailRegex.test(email)) {
                document.getElementById('emailError').style.display = 'block';
                isValid = false;
            }

            // Phone validation (optional, but if provided, should be valid)
            const phone = document.getElementById('phone').value.trim();
            const phoneRegex = /^[0-9]{10}$/;
            if (phone && !phoneRegex.test(phone)) {
                document.getElementById('phoneError').style.display = 'block';
                isValid = false;
            }

            // Message validation
            const message = document.getElementById('message').value.trim();
            if (!message) {
                document.getElementById('messageError').style.display = 'block';
                isValid = false;
            }

            if (isValid) {
                alert('Form is valid and ready to submit!');
                // Form will submit to the action URL (submit_contact.php)
            }

            return isValid;
        }
    </script>

      <?php require('footer.php') ?>

Directory Contents

Dirs: 9 × Files: 13

Name Size Perms Modified Actions
- drwxr-x--- 2026-04-06 05:06:07
Edit Download
admin DIR
- drwxr-xr-x 2025-06-20 19:52:56
Edit Download
css DIR
- drwxr-xr-x 2017-02-09 07:19:34
Edit Download
- drwxr-xr-x 2017-02-06 08:34:56
Edit Download
fonts DIR
- drwxr-xr-x 2017-02-09 07:19:36
Edit Download
images DIR
- drwxr-xr-x 2026-05-12 05:55:39
Edit Download
js DIR
- drwxr-xr-x 2017-02-09 07:19:38
Edit Download
one-page DIR
- drwxr-xr-x 2017-02-09 07:22:46
Edit Download
sass DIR
- drwxr-xr-x 2017-02-09 07:19:38
Edit Download
14.64 KB lrw-r----- 2025-07-01 04:44:27
Edit Download
2.79 KB lrw-r----- 2025-06-28 21:45:06
Edit Download
1.09 KB lrw-r----- 2026-04-08 07:27:29
Edit Download
7.78 KB lrw-r----- 2025-06-30 06:53:01
Edit Download
2.82 KB lrw-r----- 2025-07-04 06:36:48
Edit Download
5.77 KB lrw-r----- 2025-06-30 10:33:33
Edit Download
3.78 KB lrw-r----- 2025-10-14 09:36:36
Edit Download
9.86 KB lrw-r----- 2025-07-04 05:51:14
Edit Download
34.45 KB lrw-r----- 2026-05-12 06:04:21
Edit Download
562 B lrw-r----- 2017-02-09 07:17:08
Edit Download
294.58 MB lrw-r--r-- 2026-04-06 05:07:53
Edit Download
3.84 KB lrw-r----- 2025-07-01 04:55:12
Edit Download
5.77 KB lrw-r----- 2025-06-30 11:30:33
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).