<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>NDC</title>
    <link rel="icon" href="assets/img/logo.jpg" type="image/ico">
    <!-- SweetAlert -->
    <script src="//cdn.jsdelivr.net/npm/sweetalert2@11"></script>
</head>
<body>
    <?php
    if ($_SERVER['REQUEST_METHOD'] === 'POST') {
        // Process the form submission

        // Check for any validation errors
        $errors = array();

        // Check if fields are empty or any other validation logic

        if (count($errors) == 0) {
            // Display SweetAlert error message
            echo '<script>
                    Swal.fire({
                        icon: "error",
                        title: "Error",
                        text: "Please carefully fill up all the fields.",
                        confirmButtonColor: "#3085d6",
                        confirmButtonText: "OK"
                    });
                  </script>';
        } else {
            // Form submission is successful, continue with further actions
        }
    }
    ?>
    
    <form method="POST" action="">
        <!-- Your form fields here -->

        <button type="submit">Submit</button>
    </form>
</body>
</html>
