0% found this document useful (0 votes)
265 views

PHP Microprojects 1 by Campusify

The document outlines a project report on a Gym Management System developed using PHP, detailing its key features such as member registration, payment processing, and trainer management. It emphasizes the system's importance for efficient operations, enhanced member experience, and data-driven decision-making. Additionally, it includes sections on program code and database structure to support the implementation of the system.

Uploaded by

pranavsp2810
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
265 views

PHP Microprojects 1 by Campusify

The document outlines a project report on a Gym Management System developed using PHP, detailing its key features such as member registration, payment processing, and trainer management. It emphasizes the system's importance for efficient operations, enhanced member experience, and data-driven decision-making. Additionally, it includes sections on program code and database structure to support the implementation of the system.

Uploaded by

pranavsp2810
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 34

A Project Report On

“Gym Management System”

For more Free Microprojects


Join Our Channel- https://t.me/campusifyy
Team Members
ROLL NO. NAME

1513

1530

1537

1538
INDEX
SRNO TOPIC PAGE
NO.
1. Introduction 8

2. Need of Gym Management system 10

3. Program Code 12-31

4. Output 32,33

5. Database Table 34

6. Conclusion 35
7. References 35
What is PHP?
PHP (Hypertext Preprocessor) is a widely used open-source scripting
language primarily designed for web development. It is a server-side
scripting language, meaning the code is executed on the server before being
sent to the client's browser, producing dynamic web pages. Originally
created by Danish-Canadian programmer Rasmus Lerdorf in 1994, PHP has
since evolved into one of the most popular programming languages for web
development.

 Key Features and Characteristics:

 Simplicity:
PHP is known for its ease of use and simplicity, making it an ideal language
for beginners. Its syntax is similar to C and Perl, which makes it familiar to
many programmers.

 Open Source:
PHP is open-source software, meaning it is freely available for anyone to
use, modify, and distribute. This has contributed to its widespread adoption
and continuous improvement by a large community of developers.

 Platform Independence:
PHP is platform-independent, meaning it can run on various operating
systems like Windows, Linux, macOS, and Unix. This flexibility makes it a
versatile choice for web development projects.
 Integration:
PHP seamlessly integrates with various databases, including MySQL,
PostgreSQL, Oracle, and SQLite, allowing developers to build dynamic,
database-driven websites and applications.

 Extensive Library Support:


PHP has a vast collection of built-in functions and libraries, providing
developers with the tools they need to create robust and feature-rich web
applications efficiently.

 Scalability:
PHP is highly scalable, allowing developers to build applications that can
handle a large number of users and data without sacrificing performance.

 Security:
While PHP itself is secure, developers need to follow best practices to
ensure the security of their applications. PHP offers features like data
encryption, secure authentication mechanisms, and input validation to help
developers build secure web applications.
Project Introduction
In this project, we are crafting a sophisticated and feature-packed Gym
Management System using the PHP programming language. Our goal is to
provide users with a comprehensive tool capable of handling Gym
operations Our System is user – friendly

 Key Features:
1. Member Registration: Allows staff to register new members by collecting
necessary details such as personal information, contact details, health history,
and preferences.

2. Member Details: Provides a comprehensive view of member profiles


including personal information, membership status, attendance history, and
any special instructions or requirements.

3. Package Details: Stores information about membership packages offered


by the gym, including pricing, duration, services included, and any special
promotions.

4. Payment Details - View: Displays all payment transactions made by


members, including membership fees, additional services, and retail
purchases.

5. Payment Details - Add New: Enables staff to input new payment data, such
as membership fees, installment payments, or one-time purchases, and
updates member accounts accordingly.
6. Trainer Details - View: Shows information about trainers employed by the
gym, including qualifications, specialties, availability, and contact details.

7. Trainer Details - Add New: Allows administrators to add new trainers to


the system, specifying their credentials, expertise, and availability.

8. Trainer Selection during Registration : Provides an option for new


members to select a preferred trainer during the registration process,
facilitating personalized training programs and scheduling.

9. Reporting and Analytics: Generates reports and analytics on key


performance metrics such as membership growth, revenue trends, member
retention, and trainer effectiveness, aiding in strategic decision-making.

10. Security and Access Control: Implements security measures to protect


member data and ensure authorized access to the system, including user
authentication, role-based permissions, and data encryption.

12. Customization and Scalability: Offers flexibility to customize features


and adapt the system to the unique needs of the gym, with scalability to
accommodate future growth and expansion.

These key features collectively enhance operational efficiency, improve


member experience, and support the overall management of the gym
management System
Need Of Gym Management
System
The gym management system described above is essential for several reasons:

1. Efficient Operations: It streamlines various administrative tasks such as member


registration, payment processing, and attendance tracking, thereby improving overall
operational efficiency.

2. Enhanced Member Experience: The system provides members with convenient


tools to manage their memberships, book sessions, and interact with trainers, leading
to a better overall experience and higher satisfaction.

3. Improved Communication: Automated reminders and notifications help keep


members informed about important dates, events, and updates, fostering better
communication between the gym and its members.

4. Optimized Resource Utilization: By tracking member attendance and preferences,


the system helps gym owners allocate resources effectively, ensuring that facilities and
trainers are utilized to their full potential.

5. Data-Driven Decision Making: The system generates reports and analytics that
provide valuable insights into membership trends, revenue streams, and operational
performance, empowering gym owners to make informed decisions to drive business
growth.
6. Personalized Training: By allowing members to select preferred trainers during
registration and providing trainers with access to member profiles, the system enables
personalized training programs tailored to individual needs and goals.

7. Security and Compliance: The system ensures the security of member data and
compliance with privacy regulations through robust security measures such as user
authentication and data encryption.

8. Scalability and Flexibility : As the gym grows and evolves, the system can be easily
scaled up to accommodate increasing membership numbers and expanded services,
while remaining flexible enough to adapt to changing business requirements.

Overall, the gym management system is indispensable for modern fitness facilities
seeking to streamline operations, enhance member satisfaction, and drive business
success in a competitive market.
Program Code
Index.php:
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-
beta/css/bootstrap.min.css" integrity="sha384-
/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M"
crossorigin="anonymous">
</head>
<style type="text/css">
#inputbtn:hover{cursor:pointer;}
</style>
<body style="background:url('images/4.jpg'); background-size: cover;">
<div class="container-fluid" style="margin-top:60px;margin-bottom:60px;color:#34495E;">
<div class="row">
<div class="col-md-1"></div>
<div class="col-md-4">
<div class="card">
<img src="images/cardback.jpg" class="card-img-top">
<div class="card-body">
<center>
<h5>Admin Login</h5><br>
<form class="form-group" method="POST" action="admin-panel.php">
<div class="row">
<div class="col-md-4"><label>Username: </label></div>
<div class="col-md-8"><input type="text" name="username" class="form-control"
placeholder="enter username" required/></div><br><br>
<div class="col-md-4"><label>Password: </label></div>
<div class="col-md-8"><input type="password" class="form-control"
name="password" placeholder="enter password" required/></div><br><br><br>
</div>
<center><input type="submit" id="inputbtn" name="login_submit" value="Login"
class="btn btn-primary"></center>
</form>
</center>
</div>
</div>
</div>
<div class="col-md-7"></div>
</div>
</div>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-
KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN"
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js"
integrity="sha384-
b/U6ypiBEHpOf/4+1nzFpr53nxSS+GLCkfwBdFNTxtclqqenISfwAzpKaMNFNmj4"
crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js"
integrity="sha384-
h0AbiXch4ZDo7tp9hKZ4TsHbi047NrKGLO3SEJAg45jXxnGIfYzk4Si90RDIqNm1"
crossorigin="anonymous"></script>
</body>
</html>

Admin-panel.php:
<!DOCTYPE html>
<?php

// php select option value from database

$hostname = "localhost";
$username = "root";
$password = "";
$databaseName = "loginsystem";

// connect to mysql database

$connect = mysqli_connect($hostname, $username, $password, $databaseName);

// mysql select query


$query = "SELECT * FROM `Trainer`";

// for method 1

$result1 = mysqli_query($connect, $query);


?>
<html>
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-
beta/css/bootstrap.min.css" integrity="sha384-
/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M" crossorigin="anonymous">
</head>
<body>

<div class="jumbotron" style="border-radius:0;background:url('images/3.jpg');background-


size:cover;height:400px;"></div>
<div class="container-fluid">
<div class="row">
<div class="col-md-3">
<div class="list-group">
<a href="" class="list-group-item active"
>Members</a>
<a href="trainer_details.php" class="list-group-item">Member details</a>
<a href="package.php" class="list-group-item">Package details</a>
<a href="payment.php" class="list-group-item">Payments</a>
</div>
<hr>
<div class="list-group">
<a href="trainer.php" class="list-group-item active">Trainer</a>
<a href="trainer.php" class="list-group-item active">Trainer details</a>
<a href="trainer.php" class="list-group-item active">Add new Trainer</a>
</div>
</div>
<div class="col-md-8">
<div class="card">

<div class="card-body" style="background-color:#3498DB;color:FFFFFF;">


<h3>Register new members</h3>
</div>
<div class="card-body"></div>
<form class="form-group" action="func.php" method="post">
<label>first name:</label>
<input type="text" name="fname" class="form-control"><br>
<label>last name:</label>
<input type="text" name="lname" class="form-control"><br>
<label>email</label>
<input type="text" name="email" class="form-control"><br>
<label>Member ID</label>
<input type="text" name="contact" class="form-control"><br>
<label>Trainer </label>
<select class="form-control" name="docapp">
<?php while($row1 = mysqli_fetch_array($result1)):;?>
<option value="<?php echo $row1[0];?>"><?php echo $row1[1];?></option>
<?php endwhile;?>

</select>
<input type="submit" class="btn btn-primary" name="pat_submit" value="Register"> <a
href="func.php" class="btn btn-light"></a>
</form>
</div>
</div>
</div>
<div class="col-md-1"></div>
</div>
<header>
<nav>
<div class="main-wrapper">
<div class="nav-login">
<?php
if (isset($_SESSION['u_id'])) {
echo '<form action="includes/index.php" method="POST">
<button type="submit" name="submit">logout</button>
</form>';
} else{
echo '<form action="includes/index.php"
method="POST">
</form>
<a href="index.php" class="btn btn-light" style="background-
color:#3498DB;color:FFFFFF">Logout</a>';

}?>
</div>
</div>
</nav>
</header>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js"
integrity="sha384-h0AbiXch4ZDo7tp9hKZ4TsHbi047NrKGLO3SEJAg45jXxnGIfYzk4Si90RDIqNm1"
crossorigin="anonymous"></script>

</body>
</html>
Func.php:
<?php
$con=mysqli_connect("localhost","root","","loginsystem");
if(isset($_POST['login_submit'])){
$username=$_POST['username'];
$password=$_POST['password'];
$query="select * from logintb where username='$username' and password='$password'";
$result=mysqli_query($con,$query);
if(mysqli_num_rows($result)==1)
{
header("Location:admin-panel.php");

}
else
{
echo "<script>alert('error login')</script>";
echo "<script>window.open('admin-panel.php','_self')</script>";
}
}
if(isset($_POST['pat_submit']))
{
$fname=$_POST['fname'];
$lname=$_POST['lname'];
$email=$_POST['email'];
$contact=$_POST['contact'];
$docapp=$_POST['docapp'];
$query="insert into
doctorapp(fname,lname,email,contact,docapp)values('$fname','$lname','$email','$contact','$docapp')";
$result=mysqli_query($con,$query);
if($result)
{
echo "<script>alert('Member added.')</script>";
echo "<script>window.open('admin-panel.php','_self')</script>";
}
}
if(isset($_POST['tra_submit']))
{
$Trainer_id=$_POST['Trainer_id'];
$Name=$_POST['Name'];
$phone=$_POST['phone'];
$query="insert into Trainer(Trainer_id,Name,phone)values('$Trainer_id','$Name','$phone')";
$result=mysqli_query($con,$query);
if($result)
{
echo "<script>alert('Trainer added.')</script>";
echo "<script>window.open('admin-panel.php','_self')</script>";
}
}
if(isset($_POST['pay_submit']))
{
$Payment_id=$_POST['Payment_id'];
$Amount=$_POST['Amount'];
$customer_id=$_POST['customer_id'];
$payment_type=$_POST['payment_type'];
$customer_name=$_POST['customer_name'];
$query="insert into
Payment(Payment_id,Amount,customer_id,payment_type,customer_name)values('$Payment_id','$Amount
','$customer_id','$payment_type','$customer_name')";
$result=mysqli_query($con,$query);
if($result)
{
echo "<script>alert('Payment sucessfull.')</script>";
echo "<script>window.open('admin-panel.php','_self')</script>";
}
}
function
get_patient_details(){ global
$con;
$query="select * from doctorapp";
$result=mysqli_query($con,$query);
while ($row=mysqli_fetch_array($result)){
$fname=$row ['fname'];
$lname=$row['lname'];
$email=$row['email'];
$contact=$row['contact'];
$docapp=$row['docapp'];
echo "<tr>
<td>$fname</td>
<td>$lname</td>
<td>$email</td>
<td>$contact</td>
<td>$docapp</td>
</tr>";
}
}
function
get_package(){ global
$con;
$query="select * from Package";
$result=mysqli_query($con,$query);
while($row=mysqli_fetch_array($result)){
$Package_id=$row ['Package_id'];
$Package_name=$row['Package_name'];
$Amount=$row['Amount'];
echo"<tr>
<td>$Package_id</td>
<td>$Package_name</td>
<td>$Amount</td>

</tr>";

}
}
function
get_trainer(){ global
$con;
$query="select * from Trainer";
$result=mysqli_query($con,$query);
while($row=mysqli_fetch_array($result)){
$Trainer_id=$row ['Trainer_id'];
$Name=$row['Name'];
$phone=$row['phone'];
echo"<tr>
<td>$Trainer_id</td>
<td>$Name</td>
<td>$phone</td>

</tr>";

}
}
function
get_payment(){ global
$con;
$query="select * from Payment";
$result=mysqli_query($con,$query);
while($row=mysqli_fetch_array($result)){
$Payment_id=$row ['Payment_id'];
$Amount=$row['Amount'];
$payment_type=$row['payment_type'];
$customer_id=$row['customer_id'];
/*$customer_name=$row['customer_name'];*/

echo"<tr>
<td>$Payment_id</td>
<td>$Amount</td>
<td>$payment_type</td>
<td>$customer_id</td>

</tr>";

}
}
?>
Pacakge.php:
<!DOCTYPE html>
<?php include("func.php");?>
<html>
<head>
<title>Members details</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-
beta/css/bootstrap.min.css" integrity="sha384-
/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M"
crossorigin="anonymous">
</head>
<body>
<div class="jumbotron" style="background: url('images/2.jpg') no-repeat;background-size:
cover;height: 300px;"></div>

<div class="container">
<div class="card">
<div class="card-body" style="background-color:#3498DB;color:#ffffff;">
<div class="row">
<div class="col-md-1">
<a href="admin-panel.php" class="btn btn-light ">Go Back</a>
</div>
<div class="col-md-3"><h3>Pcakage Details</h3></div>
<div class="col-md-8">
<form class="form-group" action="patient_search.php" method="post">
<div class="row">

</form></div></div></div>
<div class="card-body" style="background-color:#3498DB;color:#ffffff;">
<div class="card-body">
<table class="table table-hover">
<thead>
<tr>
<th>Package ID </th>
<th>Package Name</th>
<th>Amounts</th>
</tr>
</thead>
<tbody>
<?php get_package(); ?>
</tbody>
</table>

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

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js"
integrity="sha384-
h0AbiXch4ZDo7tp9hKZ4TsHbi047NrKGLO3SEJAg45jXxnGIfYzk4Si90RDIqNm1"
crossorigin="anonymous"></script>
</div>
</body>
</html>
Payment.php:
<!DOCTYPE html>
<?php include("func.php");?>
<html>
<head>
<title>Members details</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-
beta/css/bootstrap.min.css" integrity="sha384-
/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M"
crossorigin="anonymous">
</head>
<body>
<div class="jumbotron" style="background: url('images/2.jpg') no-repeat;background-size:
cover;height: 300px;"></div>

<div class="container">
<div class="card">
<div class="card-body" style="background-color:#3498DB;color:#ffffff;">
<div class="row">
<div class="col-md-1">
<a href="admin-panel.php" class="btn btn-light ">Go Back</a>
</div>
<div class="col-md-3"><h3>Payment Details</h3></div>
<div class="col-md-8">
<form class="form-group" action="patient_search.php" method="post">
<div class="row">

</form></div></div></div>
<div class="card-body" style="background-color:#3498DB;color:#ffffff;">
<div class="card-body">
<table class="table table-hover">
<thead>
<tr>
<th>Payment ID </th>
<th>Amount</th>
<th>Payment Type</th>
<th>Customer ID</th>
<!-- <th>Customer Name</th>-->

</tr>
</thead>

<tbody>
<?php get_payment(); ?>
</tbody>
</table>
<div class="card-body" style="background-color:#3498DB;color:FFFFFF;">
<h3>Make new Payment</h3>
</div>
<div class="card-body"></div>
<form class="form-group" action="func.php" method="post">
<label> Customer Name</label>
<input type="text" name="customer_name" class="form-control">
<label>Payment ID</label>
<input type="text" name="Payment_id" class="form-control"><br>

<label>Amount</label>
<input type="text" name="Amount" class="form-control"><br>
<label>Customer ID</label>
<input type="text" name="customer_id" class="form-control"><br>
<!-- <label>Customer Name</label>
<input type="text" name="customer_name" class="form-control"><br>-->
<label>Payment Type</label>

<input type="text" name="payment_type" class="form-control"><br>


<input type="submit" class="btn btn-primary" name="pay_submit" value="PAY">
</div>
</div>
</div>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js"
integrity="sha384-
h0AbiXch4ZDo7tp9hKZ4TsHbi047NrKGLO3SEJAg45jXxnGIfYzk4Si90RDIqNm1"
crossorigin="anonymous"></script>
</div>
</body>
</html>

Signup.php:
<?php
include_once 'header.php';
?>

<section class="main-container">
<div class="main-wrapper">
<h2>signup</h2>
<form class="signup-form" action="includes/signup.inc.php" method="POST">
<input type="text" name="first" placeholder="firstname">
<input type="text" name="last" placeholder="lastname">
<input type="text" name="email" placeholder="e-mail">
<input type="text" name="uid" placeholder="username">

<input type="password" name="pwd" placeholder="password">


<button type="submit" name="submit">sign up</button>
</form>
</div>
</section>
<?php
include_once 'footer.php';
?>
Style.css: input, select {
vertical-align:middle;
}
html, body, div, span, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre, /*my code*/
abbr, address, cite, code,
del, dfn, em, img, ins, kbd, q, samp, .main-
small, strong, sub, sup, var, wrapper{ margin: 0
b, i, auto; width:
dl, dt, dd, ol, ul, li, 1000px;
fieldset, form, label, legend, }
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, figcaption, figure, a{
footer, header, hgroup, menu, nav, section, sum text-decoration: none;
time, mark, audio, video { mary, }
margin:0;
padding:0; body{
border:0; background-color: #ccc;
outline:0; }
font-size:100%;
vertical-align:baseline; header nav{
background:transparent; width: 100%;
} height: 60px;
background-color: #fff;
body { }
line-height:1;
} header nav ul
{ float:left;
article,aside,details,figcaption,figure, }
footer,header,hgroup,menu,nav,section {
display:block;
} header nav ul
li{ float:left;
list-style:none;
nav ul { }
list-style:none;
} header nav ul li a
{ font-family:
blockquote, q arial; font-size:
{ quotes:none; 20 px;
} color: #111;
line-height: 63px;
blockquote:before, blockquote:after, }
q:before, q:after {
content:''; header .nav-login
content:none; { float: right;
}
} vertical-align:baseline;
background:transparent;
a
{ margin:
0;
padding:0;
font-size:100%;
ader .nav-login form
{ float: left;
h padding-top: 15px;
e }
}
.main-container
/* change colours to suit your needs */ h2{ font-family:
ins { arial; font-size:
background-color:#ff9; 40px; color:
color:#000; #111;
text-decoration:none; line-height: 50px;
text-align: center;
}
}
/* change colours to suit your needs */
mark { /* signup.php*/
background-color:#ff9;
color:#000; .signup-form
font-style:italic; { width: 400px;
font-weight:bold; margin: 0 auto;
} padding-top: 30px;
}
del {
text-decoration: line-through; .signup-form input {
}
width: 90%;
abbr[title], dfn[title] { height: 40px;
border-bottom:1px dotted; padding: 0px 5%;
cursor:help; margin-bottom: 4px;
} border: none;
background-color: #fff;
table { font-family: arial;
border-collapse:collapse; font-size: 16px;
border-spacing:0; color: #111;
} line-height: 40px;
}
/* change border colour to suit your needs * /
hr { .signup-form button
display:block; { display: block;
height:1px; margin: 0 auto;
border:0; width: 30%;
border-top:1px solid #cccccc; height: 40px;
margin:1em 0; border: none;
padding:0; background-color: #222;
} font-family: arial;
font-size: 20px;
color: #fff;
cursor: pointer;
height: 30px; }
padding: 0px 10px;
margin-right: 10px; .signup-form button:hover
border: none; { background-color:
background-color: #ccc; #111;
font-family: arial;
font-size: 14px; }
color: #111;
line-height: 30px;;
}
header .nav-login form button
{ float: left;
width: 60px; height:
30px; margin-right:
10px; border: none;
background-color: #f3f3f3;
font-family: arial;
font-size: 14px;
color: #111;
cursor: pointer;

header .nav-login form button:hover {

background-color: #ccc;
}

header .nav-login a
{ display: block;
width:30px;
height: 30px;
border: none;
float: left;
background-color: #fff;
font-family: arial;
font-size: 16px;
color: #111;
line-height: 63px;
cursor: pointer;
}

.main-
container{ padding
-top: 40px;
}

Trainer_details.php
<!DOCTYPE html>
<?php include("func.php");?>
<html>
<head>
<title>Members details</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-
beta/css/bootstrap.min.css" integrity="sha384-
/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M" crossorigin="anonymous">
</head>
<body>
<div class="jumbotron" style="background: url('images/2.jpg') no-repeat;background-size: cover;height:
300px;"></div>

<div class="container">
<div class="card">
<div class="card-body" style="background-color:#3498DB;color:#ffffff;">
<div class="row">
<div class="col-md-1">
<a href="admin-panel.php" class="btn btn-light ">Go Back</a>
</div>
<div class="col-md-3"><h3>Members Details</h3></div>
<div class="col-md-8">
<form class="form-group" action="trainer_search.php" method="post">
<div class="row">
<div class="col-md-10"><input type="text" name="search" class="form-control" placeholder="enter
contact"></div>
<div class="col-md-2"><input type="submit" name="patient_search_submit" class="btn btn-light"
value="Search"> </div></div>
</form></div></div></div>
<div class="card-body" style="background-color:#3498DB;color:#ffffff;">
<div class="card-body">
<table class="table table-hover">
<thead>
<tr>
<th>First Name</th>
<th>Last Name</th>
<th>Email id</th>
<th>Member ID</th>
<th>Trainer ID</th>
</tr>
</thead>
<tbody>
<?php get_patient_details(); ?>
</tbody>
</table>
</div>
</div>
</div) >
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js" integrity="sha384-
h0AbiXch4ZDo7tp9hKZ4TsHbi047NrKGLO3SEJAg45jXxnGIfYzk4Si90RDIqNm1"
crossorigin="anonymous"></script>
</div>
</body>
</html>
Trainer_search.php
<html>
<head>
<title>Patient details</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-
beta/css/bootstrap.min.css" integrity="sha384-
/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M" crossorigin="anonymous">
</head>
<body>
<?php
include("func.php");
if(isset($_POST['patient_search_submit']))
{
$contact=$_POST['search'];
$query="select * from doctorapp where contact='$contact'";
$result=mysqli_query($con,$query);
echo "<div class='container-fluid' style='margin-top:50px;'>
<div class'card'>
<div class='card-body'><a href='trainer_details.php' class='btn brn-light'>Go Back</a></div>
<img src='images/1.jpg'>
<table class='table table-hover'>
<thead>
<tr>
<th>First name</th>
<th>Last name</th>
<th>Email id</th>
<th>Contact</th>
<th>Trainer ID</th>
</tr>
</thead>
<tbody>
</div></div>";
while ($row=mysqli_fetch_array($result)){
$fname=$row ['fname'];
$lname=$row['lname'];
$email=$row['email'];
$contact=$row['contact'];
$docapp=$row ['docapp'];
echo " <tr>
<td>$fname</td>
<td>$lname</td>
<td>$email</td>
<td>$contact</td>
<td>$docapp</td>
</tr>";
}
echo "</tbody></table></div></div></div>";
}
?>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js" integrity="sha384-
h0AbiXch4ZDo7tp9hKZ4TsHbi047NrKGLO3SEJAg45jXxnGIfYzk4Si90RDIqNm1"
crossorigin="anonymous"></script>
</body>
</html>

Trainer.php
<!DOCTYPE html>
<?php include("func.php");?>
<html>
<head>
<title>Members details</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-
beta/css/bootstrap.min.css" integrity="sha384-
/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M" crossorigin="anonymous">
</head>
<body>
<div class="jumbotron" style="background: url('images/2.jpg') no-repeat;background-size: cover;height:
300px;"></div>

<div class="container">
<div class="card">
<div class="card-body" style="background-color:#3498DB;color:#ffffff;">
<div class="row">
<div class="col-md-1">
<a href="admin-panel.php" class="btn btn-light ">Go Back</a>
</div>
<div class="col-md-3"><h3> Trainer Information</h3></div>
<div class="col-md-8">
<form class="form-group" action="patient_search.php" method="post">
<div class="row">

</form></div></div></div>
<div class="card-body" style="background-color:#3498DB;color:#ffffff;">
<div class="card-body">
<table class="table table-hover">
<thead>
<tr>

<th>Trainer ID</th>
<th>Name</th>
<th>Phone</th>

</tr>
</thead>
<tbody>
<?php get_trainer(); ?>
</tbody>
</table>
<div class="card-body" style="background-color:#3498DB;color:FFFFFF;">
<h3>Register new Trainer</h3>
</div>
<div class="card-body"></div>
<form class="form-group" action="func.php" method="post">
<label>Trainer ID</label>
<input type="text" name="Trainer_id" class="form-control"><br>
<label>Name</label>
<input type="text" name="Name" class="form-control"><br>
<label>Phone</label>
<input type="text" name="phone" class="form-control"><br>
<input type="submit" class="btn btn-primary" name="tra_submit" value="Register">
</div>
</div>
</div>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js" integrity="sha384-
h0AbiXch4ZDo7tp9hKZ4TsHbi047NrKGLO3SEJAg45jXxnGIfYzk4Si90RDIqNm1"
crossorigin="anonymous"></script>
</div>
</body>
</html>
Dbh.inc.php:
<?php

$dbServername = "localhost";
$dbUsername = "root";
$dbPassword = "";
$dbName = "loginsystem";

$conn = mysqli_connect($dbServername, $dbUsername, $dbPassword, $dbName);


Output:
 Database Table:
Conclusion
In conclusion, our Gym Management System in PHP represents a
commitment to providing Gyms with a robust and dynamic tool for all their
operations. our System is designed to be a versatile companion in both
everyday Operations.

Reference
 www.google.com
 www.campusify.co.in

You might also like