Viewing file: insert_fees.php (2.82 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<!DOCTYPE html> <html lang="en">
<?php include 'head.php';?> <style> body { font-family: Arial, sans-serif; margin: 0; padding: 20px; }
h1, h2 { text-align: center; }
.branch-list { list-style-type: none; padding: 0; text-align: center; }
.branch-list li { margin: 10px 0; }
.branch-list a { text-decoration: none; color: #333; font-weight: bold; }
.branch-list a:hover { color: #4CAF50; }
/* Add more styling as needed */
table { border-collapse: collapse; border-spacing: 0; width: 100%; margin: 0 auto; border:2; }
th, td { padding: 10px; text-align: left; }
th { background-color: #04AA6D; color: white; } label, input { width: 200px; } </style> <style> body { font-family: Arial, sans-serif; margin: 0; padding: 20px; }
h1 { text-align: center; }
form { max-width: 500px; margin: 0 auto; }
label { display: block; margin-top: 10px; }
input[type="text"], input[type="date"], input[type="tel"], input[type="number"], textarea, select { width: 100%; padding: 10px; margin-bottom: 10px; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; }
input[type="submit"] { background-color: #4CAF50; color: white; padding: 10px 20px; border: none; border-radius: 4px; cursor: pointer; float: right; }
input[type="submit"]:hover { background-color: #45a049; } </style> <body>
<!-- ======= Header ======= --> <?php include 'menubar.php';?>
<?php include 'sidebar.php';?>
<main id="main" class="main">
<?php // Connect to the database (you need to replace these values with your actual database details) include 'connect.php';
if ($_SERVER["REQUEST_METHOD"] == "POST") { $student_id = $_POST["student_id"]; $fees_month = $_POST["fees_month"]; $fees_year = $_POST["fees_year"]; $fees_amount = $_POST["fees_amount"]; $payment_date = $_POST["day"].'/'.$_POST["month"].'/'.$_POST["year"]; $student_name = $_POST["student_name"]; $student_mobile = $_POST["student_mobile"]; $present = $_POST["present"]; $day = $_POST["day"]; $month = $_POST["month"]; $year = $_POST["year"]; $sql = "INSERT INTO monthly_fees (student_id, fees_month, fees_year, paid_fees, payment_date,student_name,student_mobile1,total_present_days,deposit_fees_date,deposit_fees_month,deposit_fees_year) VALUES ('$student_id', '$fees_month', '$fees_year', '$fees_amount', '$payment_date', '$student_name','$student_mobile','$present','$day','$month','$year')";
if ($conn->query($sql) === TRUE) { echo "Fees Updated"; } else { echo "Error: " . $sql . "<br>" . $conn->error; } }
$conn->close(); ?>
<H1> <a href="index.php">Go Back and Check Fees</a> </h1>
</main><!-- End #main -->
<?php include 'footer.php';?>
</body>
</html>
|