Employee Leave Management System Using PHP With Source Code

Here, Employee has to log in and employee can easily apply for a leave. Admin has to approve or decline the leave request. Admin can add/manage leave type and add/manage employees.  This is a simple project done in PHP. It’s easy to operate and understand by users.The design is pretty simple and the user won’t find it difficult to understand, use and navigate.



Features :


  1. Login System
  2. Admin Panel
  3. Apply leave, History
  4. Add, Manage Department
  5. Add, Manage Leave Type


How To Run?



You’ll need XAMP Server or WAMP Server. Put the file inside “c:/wamp/www/” or “c:/xampp/htdocs/”. Go To “localhost/phpmyadmin” in any browser and create Database (name according to SQL file).In that Database, Import the SQL file and finally go to URL: “http://localhost/file_name/phpfilename”
Don’t Forget To create a database and import SQL file to run


Post a Comment

12 Comments

  1. hi, i have some problem. my apply leave doesn't work and its showing ERROR:Something went wrong. Please try again

    here is the coding

    $todate){
    $error=" toDate should be greater than fromDate ";
    }
    $sql="INSERT INTO tableLeaves(leaveType,noDays,toDate,fromDate,reasonLeaves,destination,departureDate,returningDate,dependantsAccompany,noDependants,ticketType,lastFrom,toFrom,status,IsRead,empid) VALUES(:leavetype,:nodays,:fromdate,:todate,:reasonleaves,:destination,:departuredate,:returningdate,:dependantsaccompany,:nodependants,:tickettype,:lastfrom,:tofrom,:status,:isread,:empid)";
    $query = $dbh->prepare($sql);
    $query->bindParam(':leavetype',$leavetype,PDO::PARAM_STR);
    $query->bindParam(':nodays',$nodays,PDO::PARAM_STR);
    $query->bindParam(':fromdate',$fromdate,PDO::PARAM_STR);
    $query->bindParam(':todate',$todate,PDO::PARAM_STR);
    $query->bindParam(':reasonleaves',$reasonleaves,PDO::PARAM_STR);
    $query->bindParam(':destination',$destination,PDO::PARAM_STR);
    $query->bindParam(':departuredate',$departuredate,PDO::PARAM_STR);
    $query->bindParam(':returningdate',$returningdate,PDO::PARAM_STR);
    $query->bindParam(':dependantsaccompany',$dependantsaccompany,PDO::PARAM_STR);
    $query->bindParam(':nodependants',$nodependants,PDO::PARAM_STR);
    $query->bindParam(':tickettype',$tickettype,PDO::PARAM_STR);
    $query->bindParam(':lastfrom',$lastfrom,PDO::PARAM_STR);
    $query->bindParam(':tofrom',$tofrom,PDO::PARAM_STR);
    $query->bindParam(':status',$status,PDO::PARAM_STR);
    $query->bindParam(':isread',$isread,PDO::PARAM_STR);
    $query->bindParam(':empid',$empid,PDO::PARAM_STR);
    $query->execute();
    $lastInsertId = $dbh->lastInsertId();
    if($lastInsertId)
    {
    $msg="Leave applied successfully";
    }
    else
    {
    $error="Something went wrong. Please try again";
    }
    }
    ?>

    ReplyDelete
  2. hi, i have some problem. my apply leave doesn't work and its showing ERROR:Something went wrong. Please try again

    here is the coding

    $todate){
    $error=" toDate should be greater than fromDate ";
    }
    $sql="INSERT INTO tableLeaves(leaveType,noDays,toDate,fromDate,reasonLeaves,destination,departureDate,returningDate,dependantsAccompany,noDependants,ticketType,lastFrom,toFrom,status,IsRead,empid) VALUES(:leavetype,:nodays,:fromdate,:todate,:reasonleaves,:destination,:departuredate,:returningdate,:dependantsaccompany,:nodependants,:tickettype,:lastfrom,:tofrom,:status,:isread,:empid)";
    $query = $dbh->prepare($sql);
    $query->bindParam(':leavetype',$leavetype,PDO::PARAM_STR);
    $query->bindParam(':nodays',$nodays,PDO::PARAM_STR);
    $query->bindParam(':fromdate',$fromdate,PDO::PARAM_STR);
    $query->bindParam(':todate',$todate,PDO::PARAM_STR);
    $query->bindParam(':reasonleaves',$reasonleaves,PDO::PARAM_STR);
    $query->bindParam(':destination',$destination,PDO::PARAM_STR);
    $query->bindParam(':departuredate',$departuredate,PDO::PARAM_STR);
    $query->bindParam(':returningdate',$returningdate,PDO::PARAM_STR);
    $query->bindParam(':dependantsaccompany',$dependantsaccompany,PDO::PARAM_STR);
    $query->bindParam(':nodependants',$nodependants,PDO::PARAM_STR);
    $query->bindParam(':tickettype',$tickettype,PDO::PARAM_STR);
    $query->bindParam(':lastfrom',$lastfrom,PDO::PARAM_STR);
    $query->bindParam(':tofrom',$tofrom,PDO::PARAM_STR);
    $query->bindParam(':status',$status,PDO::PARAM_STR);
    $query->bindParam(':isread',$isread,PDO::PARAM_STR);
    $query->bindParam(':empid',$empid,PDO::PARAM_STR);
    $query->execute();
    $lastInsertId = $dbh->lastInsertId();
    if($lastInsertId)
    {
    $msg="Leave applied successfully";
    }
    else
    {
    $error="Something went wrong. Please try again";
    }
    }
    ?>

    ReplyDelete
  3. I read your blog on daily basis. This is really great and informative post. Thanks for sharing.
    Leave Management

    ReplyDelete
  4. Wow this is so amazing, i love the work

    ReplyDelete
  5. outstanding tips and a great overview of leave management system. I got a lot of information from this post. Thank you for the fantastic blog. Leave Management System helps the organisation to Manages the system of leaves and makes it easy to refer later by managers.

    ReplyDelete
  6. how to download the project ? should we have to pay?

    ReplyDelete
  7. Hey, thanks for the outstanding tips and a great overview on leave management system. Online Leave Management Software helps the organisation and the HR to manage the system of leaves and makes the process easy.

    ReplyDelete
  8. Ohh Wow such a very useful informative and good quality content in this post, i really enjoy this post.
    thanks for sharing amazing post with us, Keep it up. visit my blog....XPRO Drone Review

    ReplyDelete