Attendance Management System in PHP:PART 1

Attendance Management System in PHP:PART 1


Hello guys,I hope you all are fine In this tutorial series I am going to explain how to How to develop Student Attendance System so in this tutorial we will develop a form in which you can add students in the database so let’s start so first we need to we need bootstrap files you can get bootstrap files from this bootstrap cdn files w3schools.com you can copy these files files links and you can add it here in the head tag also start the html tags here now we want to show the heading of our project so we will use container

tag class we will use here is well text-center Now if you execute this one It will look like this but we will use the

tag It will look good as you can see Now in the next we will since will need this file again and again we will not close thecopy this one in the file we will create add.php we will include this file include(“header.” include(“header.php”) Now We will create two buttons one for the back and other for the add students let’s see how we create this one for that we will use

first one is the

23 thoughts on “Attendance Management System in PHP:PART 1

  1. very nice video sir ,sir i have 2 table ,i want to joint both and view in one how can i joint this two
    table A) name,rollno,class,subject and table B) date ,attendance status , how to can joint this table ??? plz plz sir it very urgent olz must reply i use to fallow ur tuterial

  2. i got this error
    please help me sir ,its very urgent
    please help

    Notice: Undefined index: attendance_status in C:xampphtdocsproindex.php on line 7

    Warning: Invalid argument supplied for foreach() in C:xampphtdocsproindex.php on line 7

    CODE:-
    <?php
    include("db.php");
    include("header.php");
    $flag=0;
    if(isset($_POST['submit']))
    {
    foreach($_POST['attendance_status'] as $id=>$attendance_status)
    {
    $student_name=$_POST['student_name'][$id];
    $roll_number=$_POST['roll_number'][$id];
    $date=date("Y-m-d H:i:s");

    $result=mysqli_query($con,"insert into attendance_records(student_name,roll_number,attendance_status,date)values('$student_name','$roll_number','$attendance_status','$date')");
    if($result)
    {
    $flag=1;
    }

    }

    }

    ?>

    <div class="panel panel-default">

    <div class="panel panel-heading">
    <h2>
    <a class="btn btn-success" href="add.php">Add Student</a>
    <a class="btn btn-info pull-right" href="view_all.php">View All</a>
    </h2>

    <?php if($flag) { ?>
    <div class="alert alert-success">
    Attendance Data Inserted Successfully

    </div>
    <?php } ?>

    <h3><div class="well text-center">Date:<?php echo date("Y-m-d"); ?> </div></h3>

    <div class="panel panel-body">

    <form action="index.php" method="post">

    <table class="table table-striped">
    <tr>

    <th>#serial Number</th><th>Student Name</th><th>Roll Number</th><th> Attendance Status</th>
    </tr>

    <?php $result=mysqli_query($con,"select * from attendance");
    $serialnumber=0;
    $counter=0;
    while($row=mysqli_fetch_array($result))
    {
    $serialnumber++;

    ?>

    <tr>
    <td> <?php echo $serialnumber; ?> </td>
    <td> <?php echo $row['student_name']; ?>
    <input type="hidden" value="<?php echo $row['student_name']; ?>" name="student_name[]">
    </td>
    <td> <?php echo $row['roll_number']; ?>
    <input type="hidden" value="<?php echo $row['roll_number']; ?>" name="roll_number[]">
    </td>
    <td>
    <input type="radio" name="attendance_status[<?php echo $counter; ?>]" value="Present">Present
    <input type="radio" name="attendance_status[<?php echo $counter; ?>]" value="Absent"> Absent
    </td>
    </tr>

    <?php
    $counter++;
    }
    ?>

    </table>

    <input type="submit" name="submit" value="submit" class="btn btn-primary">

    </form>

    </div>
    </div>
    </div>

  3. Hello sir please help me after 3 day's ago my project submission in the college so please help and please give me complete tutorials of students attendance management system

  4. if attendance is taken after every class then there will be new column in the table. plus use check box to mark as present / absent and update the table

  5. How if attendance is taken after every class and store the date time along with the teacher's name in every attendance.

Leave a Reply

Your email address will not be published. Required fields are marked *