Friday 17 March 2023

write code on school fees full system fontend and backend code in html css javascript boostrapphp

 Building a full school fees system involves a lot of work and it would not be possible to provide the entire code in this format. However, I can provide you with some guidelines and examples of what the frontend and backend code in HTML, CSS, JavaScript, Bootstrap, and PHP might look like.

Frontend Code (HTML, CSS, JavaScript, Bootstrap):

  1. Home Page: A simple page with links to various sections of the system such as student login, parent login, and administrator login. You can use HTML, CSS, and Bootstrap to create an attractive and responsive layout.

  2. Student Login Page: A page where students can log in and view their fees balances, payment history, and other related information. Use HTML, CSS, JavaScript, and Bootstrap to create a secure and user-friendly interface.

  3. Parent Login Page: A page where parents can log in and view their child's fees balances, payment history, and other related information. Use HTML, CSS, JavaScript, and Bootstrap to create a secure and user-friendly interface.

  4. Administrator Login Page: A page where school administrators can log in and view various reports, manage student data, and perform other administrative tasks. Use HTML, CSS, JavaScript, and Bootstrap to create a secure and user-friendly interface.

Backend Code (PHP):

  1. Database Connection: Create a PHP script to connect to the MySQL database where you will store the fees information.
PHP
$servername = "localhost"; $username = "username"; $password = "password"; $dbname = "fees_db"; $conn = new mysqli($servername, $username, $password, $dbname); if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); }
  1. User Authentication: Create a PHP script to authenticate users based on their login credentials.
PHP
session_start(); if($_SERVER["REQUEST_METHOD"] == "POST") { $username = mysqli_real_escape_string($conn,$_POST['username']); $password = mysqli_real_escape_string($conn,$_POST['password']); $sql = "SELECT id FROM users WHERE username = '$username' and password = '$password'"; $result = mysqli_query($conn,$sql); $row = mysqli_fetch_array($result,MYSQLI_ASSOC); $count = mysqli_num_rows($result); if($count == 1) { $_SESSION['login_user'] = $username; header("location: welcome.php"); } else { $error = "Your Login Name or Password is invalid"; } }
  1. Student Information: Create a PHP script to retrieve and display student information from the database.
PHP
$sql = "SELECT * FROM students WHERE id = $student_id"; $result = $conn->query($sql); if ($result->num_rows > 0) { // output data of each row while($row = $result->fetch_assoc()) { echo "Name: " . $row["name"]. "<br>"; echo "Class: " . $row["class"]. "<br>"; echo "Fees Balance: $" . $row["fees_balance"]. "<br>"; } } else { echo "No results"; }
  1. Payment Processing: Create a PHP script to process fees payments and update the database accordingly.
PHP
if($_SERVER["REQUEST_METHOD"] == "POST") { $student_id = mysqli_real_escape_string($conn,$_POST['student_id']); $amount = mysqli_real_escape_string($conn,$_POST['amount']); $date_paid = mysqli_real_escape_string($conn,$_POST['date_paid']); $sql = "INSERT INTO fees_payments (student_id, amount, date_paid) VALUES ('$