Back End
Back End
Participantclass:-
publicclassParticipant
{
private
intid;private String
name;private
intage;privateinthei
ght;privateintweight
;
private int
phonenumber;privateStrin
gemail;private
Timetime;privateStringjd
ate;
publicintgetId()
{
returnid;
}
publicvoidsetId(intid)
{
this.id=id;
}
publicStringgetName()
{
returnname;
}
publicvoidsetName(Stringname)
{
this.name=name;
}
publicintgetAge()
{
returnage;
}
publicvoidsetAge(intage)
{
this.age=age;
}
publicintgetHeight()
{
returnheight;
}
publicvoidsetHeight(intheight)
{
this.height=height;
}
publicintgetWeight()
{
returnweight;
}
publicvoidsetWeight(intweight)
{
this.weight=weight;
}
publicintgetPhonenumber()
{
returnphonenumber;
}
publicvoidsetPhonenumber(intphonenumber)
{
this.phonenumber=phonenumber;
}
publicStringgetEmail()
{
returnemail;
}
publicvoidsetEmail(Stringemail)
{
this.email=email;
}
publicTimegetTime()
{
returntime;
}
publicvoidsetTime(Timetime)
{
this.time=time;
}
publicStringgetJdate()
{
returnjdate;
}
publicvoidsetJdate(Stringjdate)
{
this.jdate=jdate;
}
ParticipantServlet:-
@WebServlet("/addparticipant")
publicclassParticipantServletextendsHttpServlet
{
privatestaticfinallongserialVersionUID=1L;
privatestaticStringINSERT_OR_EDIT="/participant.jsp";
privatestaticStringLIST_PARTICIPANT=
"/listParticipant.jsp";
privateParticipantDaodao;
publicParticipantServlet()
{
super();
dao=newParticipantDao();
}
@Override
protectedvoiddoGet(HttpServletRequestreq,HttpServletRespon
seresp)throwsServletException,IOException
{
Stringforward="";
Stringaction=req.getParameter("action");
if(action.equalsIgnoreCase("delete")){
intid=Integer.parseInt(req.getParameter("id"));dao.
deleteParticipant(id);
forward=LIST_PARTICIPANT;req.setAttribute("particip
ant",
dao.getAllParticipant());
}
elseif(action.equalsIgnoreCase("edit"))
{
forward=INSERT_OR_EDIT;
intid=Integer.parseInt(req.getParameter("id"));Part
icipant participant =
dao.getParticipantById(id);
req.setAttribute("partici",participant);
}
elseif(action.equalsIgnoreCase("listParticipant"))
{
forward =
LIST_PARTICIPANT;req.setAttribute("users",
dao.getAllParticipant());
}
else
{
forward=INSERT_OR_EDIT;
}
RequestDispatcherview=req.getRequestDispatcher(forward)
;
view.forward(req,resp);
}
@Override
protectedvoiddoPost(HttpServletRequestreq,HttpServletRespo
nseresp)throwsServletException,IOException
{
Participantparticipant=newParticipant();
participant.setName(req.getParameter("participantname"));
participant.setAge(Integer.parseInt(req.getParameter("participa
ntage")));
participant.setHeight(Integer.parseInt(req.getParameter("partic
ipantHeight")));
participant.setWeight(Integer.parseInt(req.getParameter("partic
ipantweight")));
participant.setPhonenumber(Integer.parseInt(req.getParameter("p
articipantnumber")));
participant.setEmail(req.getParameter("participantemail"));
participant.setTime(Time.valueOf(req.getParameter("participantt
ime")));
participant.setJdate(req.getParameter("participantDate"));
Stringid=req.getParameter("id");
if(id==null||id.isEmpty())
{
dao.addParticipant(participant);
}
else
{
participant.setId(Integer.parseInt(id));dao.update
Participant(participant);
}
// Assumingthefollowingblockisforforwardingtoa page,
so I'vekept it asit is
RequestDispatcher
view=req.getRequestDispatcher(LIST_PARTICIPANT);
req.setAttribute("users",dao.getAllParticipant());view
.forward(req, resp);
}
ParticipantDao:-
publicclassParticipantDao
{
privateConnectionconnection;
publicParticipantDao()
{
connection=MainConfig.getConnection();
}
//addparticipant
publicvoidaddParticipant(Participantparticipant)
{
try
{
PreparedStatementpreparedStatement=connection.prepa
reStatement("insert
intoparticipant(participantname,participantage,participantHeigh
t,participantweight,participantnumber,participantemail,particip
anttime,participantdate)values(?,?,?,?,?,?,?,?)");
preparedStatement.setString(1,participant.getName
());
preparedStatement.setInt(2,participant.getAge()
);
preparedStatement.setInt(3,participant.getHeight(
));
preparedStatement.setInt(4,participant.getWeight(
));
preparedStatement.setInt(5,participant.getPhonenu
mber());
preparedStatement.setString(6,participant.getEmai
l());
preparedStatement.setTime(7,participant.getTime()
);
preparedStatement.setString(8,participant.getJdate());preparedS
tatement.executeUpdate();
}
catch(SQLExceptione)
{
e.printStackTrace();
}
}
//deleteparticipant
publicvoiddeleteParticipant(intid)
{
try
{
PreparedStatementpreparedStatement=connection.pr
epareStatement("deletefromparticipantwhereid=?");
preparedStatement.setInt(1,id);preparedStatement
.executeUpdate();
}
catch(SQLExceptione)
{
e.printStackTrace();
}
}
//updateparticipant
publicvoidupdateParticipant(Participantparticipant)
{
try
{
PreparedStatementpreparedStatement=connection.pr
epareStatement("updateparticipantsetparticipantname=?,participa
ntage=?,participantHeight=?,participantweight=?,participantnumb
er=?,participantemail=?,participanttime=?,participantdate=?"+"w
here id=?");
preparedStatement.setString(1,participant.getNa
me());
preparedStatement.setInt(2,participant.getAge())
;
preparedStatement.setInt(3,participant.getHeight()
);
preparedStatement.setInt(4,participant.getWeight()
);
preparedStatement.setInt(5,participant.getPhonenum
ber());
preparedStatement.setString(6,participant.getEmail
());
preparedStatement.setTime(7,participant.getTime())
;
preparedStatement.setString(8,participant.getJdate
());
preparedStatement.executeUpdate();
}
catch(SQLExceptione)
{
e.printStackTrace();
}
}
publicList<Participant>getAllParticipant()
{
List<Participant>participants=new
ArrayList<Participant>();
try
{
Statement statement
=connection.createStatement();
ResultSetrs=statement.executeQuery("select*from
participant");
while(rs.next())
{
Participant partici =
newParticipant();partici.setId(rs.getInt("i
d"));
partici.setName(rs.getString("participantname"));
partici.setAge(rs.getInt("participantage"));
partici.setHeight(rs.getInt("participantHeight"));
partici.setWeight(rs.getInt("participantweight"));
partici.setPhonenumber(rs.getInt("participantnumber"));
partici.setEmail(rs.getString("participantemail"));
partici.setTime(rs.getTime("participanttime"));
partici.setJdate(rs.getString("participantDate"));
participants.add(partici);
}
}
catch(SQLExceptione)
{
e.printStackTrace();
}
returnparticipants;
}
//getparticipantId
publicParticipantgetParticipantById(intid)
{
Participantpartici=newParticipant();
try
{
PreparedStatementpreparedStatement
=connection.prepareStatement("select*fromparticipantwhereid=?")
;
preparedStatement.setInt(1,id);
ResultSet rs=preparedStatement.executeQuery();
if(rs.next())
{
partici.setId(rs.getInt("id"));
partici.setName(rs.getString("participantna
me"));
partici.setAge(rs.getInt("participantage"))
;partici.setHeight(rs.getInt("participantHe
ight"));
partici.setWeight(rs.getInt("participantwei
ght"));
partici.setPhonenumber(rs.getInt("participa
ntnumber"));
partici.setEmail(rs.getString("participante
mail"));
partici.setTime(rs.getTime("participanttime
"));
partici.setJdate(rs.getString("participantD
ate"));
}
catch(SQLExceptione)
{
e.printStackTrace();
}
returnpartici;
}
Batchclass:-
privateintid;
privateStringname;
privateTimetime;
publicintgetId()
{
returnid;
}
publicvoidsetId(intid)
{
this.id=id;
}
publicStringgetName()
{
returnname;
}
publicvoidsetName(Stringname)
{
this.name=name;
}
publicTimegetTime()
{
returntime;
}
publicvoidsetTime(Timetime)
{
this.time=time;
}
BatchServlet:-
@WebServlet("/addbatch")
publicclassBatchServletextendsHttpServlet{
privatestaticfinallongserialVersionUID=1L;
privatestaticfinalStringINSERT_OR_EDIT="/batch.jsp";
privatestaticfinalStringLIST_BATCH="/listBatch.jsp";
privateBatchDaodao;
publicBatchServlet(){
super();
dao=newBatchDao();
}
@Override
protectedvoiddoGet(HttpServletRequestreq,HttpServletRespons
eresp)throwsServletException,IOException
{
Stringforward="";
Stringaction=req.getParameter("action");
if(action.equalsIgnoreCase("delete")){
intid=Integer.parseInt(req.getParameter("id"));dao.
deleteBatch(id);
forward=LIST_BATCH;
req.setAttribute("batches",dao.getAllBatches());
}elseif(action.equalsIgnoreCase("edit"))
{forward =INSERT_OR_EDIT;
intid=Integer.parseInt(req.getParameter("id"));Batc
h batch=
dao.getBatchById(id);req.setAttribute("batch",
batch);
}elseif(action.equalsIgnoreCase("listBatch")){forward =
LIST_BATCH;
req.setAttribute("batches",dao.getAllBatches());
}else{
forward=INSERT_OR_EDIT;
}
RequestDispatcherview=req.getRequestDispatcher(forward)
;
view.forward(req,resp);
}
@Override
protectedvoiddoPost(HttpServletRequestreq,HttpServletRespon
seresp)throwsServletException,IOException
{
Batch batch =new
Batch();batch.setName(req.getParameter("batchname"));
batch.setTime(Time.valueOf(req.getParameter("batchtime")));
Stringid=req.getParameter("id");
if (id == null || id.isEmpty())
{dao.addBatch(batch);
}else{
batch.setId(Integer.parseInt(id));dao.updateBatch(b
atch);
}
RequestDispatcherview=req.getRequestDispatcher(LIST_BAT
CH);
req.setAttribute("batches",dao.getAllBatches());view.fo
rward(req, resp);
}
}
BatchDao:-
publicclassBatchDao
{
privateConnectionconnection;
publicBatchDao(){
connection=MainConfig.getConnection();
}
//AddBatch
publicvoidaddBatch(Batchbatch){
try{
PreparedStatementpreparedStatement=connection.
prepareStatement("insertintobatch(batchname,batchtime) values
(?, ?)");
preparedStatement.setString(1,batch.getName())
;
preparedStatement.setTime(2,batch.getTime())
;
preparedStatement.executeUpdate();
} catch (SQLException e)
{e.printStackTrace();
}
}
//DeleteBatch
publicvoiddeleteBatch(intid){
try{
PreparedStatementpreparedStatement=connection.
prepareStatement("deletefrombatchwhereid=?");
preparedStatement.setInt(1,id);preparedStateme
nt.executeUpdate();
} catch (SQLException e)
{e.printStackTrace();
}
}
//UpdateBatch
publicvoidupdateBatch(Batchbatch){
try{
PreparedStatementpreparedStatement=connection.
prepareStatement("updatebatchsetbatchname=?,batchtime=? where
id=?");
preparedStatement.setString(1,batch.getName())
;
preparedStatement.setTime(2,batch.getTime())
;
preparedStatement.setInt(3,batch.getId());prep
aredStatement.executeUpdate();
}catch(SQLExceptione){
e.printStackTrace();
}
}
//GetAllBatches
publicList<Batch>getAllBatches(){List<Batch>
batches =new ArrayList<>();try {
Statement statement
=connection.createStatement();
ResultSetrs=statement.executeQuery("select
*frombatch");
while(rs.next()){
Batch batch=
newBatch();batch.setId(rs.getInt("id"));ba
tch.setName(rs.getString("batchname"));bat
ch.setTime(rs.getTime("batchtime"));batche
s.add(batch);
}
} catch (SQLException e)
{e.printStackTrace();
}
returnbatches;
}
//GetBatchbyId
public Batch getBatchById(int id)
{Batchbatch=newBatch();
try{
PreparedStatementpreparedStatement=connection.
prepareStatement("select*frombatchwhereid=?");
preparedStatement.setInt(1,id);
ResultSetrs=preparedStatement.executeQuery();
if(rs.next())
{batch.setId(rs.getInt("id"));batch.setNa
me(rs.getString("batchname"));batch.setTi
me(rs.getTime("batchtime"));
}
} catch (SQLException e)
{e.printStackTrace();
}
returnbatch;
}
}
Indexjsp:-
<%@pagelanguage="java"contentType="text/html;charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPEhtml>
<html>
<head>
<metacharset="UTF-8">
<title>Inserttitlehere</title>
</head>
<body>
<jsp:forwardpage="/ParticipantServlet?
action=listParticipant"/>
</body>
</html>
ListParticipantjsp:-
<%@pagelanguage="java"contentType="text/html;charset=UTF-8"
pageEncoding="UTF-8"%>
<%@tagliburi="http://java.sun.com/jsp/jstl/
core"prefix="c"%>
<%@tagliburi="http://java.sun.com/jsp/jstl/fmt"prefix="fmt"%>
<!DOCTYPEhtml>
<html>
<head>
<metacharset="UTF-8">
<title>Viewlistofparticipant</title>
</head>
<body>
<tableborder="1">
<thead>
<tr>
<th>ParticipantId</th>
<th>Name</th>
<th>Age</th>
<th>Height</th>
<th>Weight</th>
<th>PhoneNumber</th>
<th>Email</th>
<th>Time</th>
<th>Date</th>
<thcolspan="2">Action</th>
</tr>
</thead>
<tbody>
<c:forEachitems="${participants}"var="participant">
<tr>
<td><c:outvalue="${participant.id}"/></td>
<td><c:outvalue="${participant.name}"/></td>
<td><c:outvalue="${participant.age}"/></td>
<td><c:outvalue="${participant.height}"
/></td>
<td><c:outvalue="${participant.weight}"
/></td>
<td><c:outvalue="${participant.phonenumber}"
/></td>
<td><c:outvalue="${participant.email}"
/></td>
<td><c:outvalue="${participant.time}"/></td>
<td><c:outvalue="${participant.jdate}"
/></td>
<td><a
href="ParticipantServlet?
action=edit&participantId=<c:outvalue="$
{participant.id}"/>">Update</a></td>
<td><ahref="ParticipantController?
action=delete&participantId=<c:outvalue="$
{participant.id}"/>">Delete</a></td>
</tr>
</c:forEach>
</tbody>
</table>
<p><ahref="ParticipantServlet?
action=insert">AddParticipant</a></p>
</body>
</html>
Participantjsp:-
<%@pagelanguage="java"contentType="text/html;charset=UTF-8"
pageEncoding="UTF-8"%>
<%@tagliburi="http://java.sun.com/jsp/jstl/
core"prefix="c"%>
<%@tagliburi="http://java.sun.com/jsp/jstl/fmt"prefix="fmt"%>
<linktype="text/css"
href="css/ui-lightness/jquery-ui-
1.8.18.custom.css"rel="stylesheet"/>
<scripttype="text/javascript"src="js/jquery-1.7.1.min.js"></
script>
<scripttype="text/javascript"src="js/jquery-ui-
1.8.18.custom.min.js"></script>
<!DOCTYPEhtml>
<html>
<head>
<metacharset="UTF-8">
<title>AddNewParticipant</title>
</head>
<body>
<formmethod="POST"action='ParticipantServlet'name="frmAddPartic
ipant">
ParticipantID:<inputtype="text"readonly="readonly"name="par
ticipantId"
value="<c:outvalue="${participant.id}"/>"/
><br/>Name:<inputtype="text"name="participantname"
value="<c:outvalue="${participant.name}"/>"/><br
/>
Age:<inputtype="text"name="participantage"value="<c:outval
ue="${participant.age}"/>"/><br/>
Height:<inputtype="text"name="participantHeight"value="<c:o
utvalue="${participant.height}"/>"/><br
/>
Weight:<inputtype="text"name="participantweight"value="<c:o
utvalue="${participant.weight}"/>"/><br
/>
PhoneNumber:<inputtype="text"name="participantnumber"value=
"<c:outvalue="${participant.phonenumber}"/>"
/><br/>
Email:<inputtype="text"name="participantemail"value="<c:out
value="${participant.email}"/>"/><br
/>
Time:<inputtype="text"name="participanttime"value="<c:outva
lue="${participant.time}"/>"/><br
/>
Date:<inputtype="text"name="participantDate"value="<c:outva
lue="${participant.jdate}"/>"/><br
/>
<inputtype="submit"value="Submit"/>
</form>
</body>
</html>
Javascript:-
<!DOCTYPEhtml>
<htmllang="en">
<head>
<metacharset="UTF-8">
<metaname="viewport"content="width=device-width,initial-scale=1.0">
<title>Document</title>
<linkrel="stylesheet"type="text/css"href="Nav.css">
<linkhref="https://cdn.jsdelivr.net/npm/[email protected]/fonts/
remixicon.css"rel="stylesheet"/>
<link
rel="stylesheet"href="https://unpkg.com/boxicons@latest/css/boxicons.min.css">
</head>
<body>
<header>
<a href="#" class="logo"><i class="bx bxs-home-
smile"></i><span>Logo</span></a>
<ulclass="navbar">
<li><ahref="#"class="active">Home</a></li>
<li><ahref="AddBatch.html">AddBatch</a></li>
<li><ahref="AddParticipant.html">AddParticipant</a></li>
<li><ahref="UpdateBatch.html">UpdateBatch</a></li>
<li><ahref="UpdateParticipant.html">UpdateParticipant</a></li>
</ul>
<divclass="main">
<ahref="#"class="user"><iclass="bxbxs-user"></i>Signin</a>
<ahref="#">Contact</a>
<divid="menu-icon"><iclass="bxbx-menu"></i></div>
</div>
</header>
<scripttype="text/javascript"src="Nav.js"></script>
</body>
</html>
AddParticipanthtml:-
<!DOCTYPEhtml>
<htmllang="en">
<head>
<metacharset="UTF-8">
<metaname="viewport"content="width=device-width,initial-scale=1.0">
<title>YaminGym </title>
<linkrel="stylesheet"href="AddParticipant.css">
<linkhref="https://cdn.jsdelivr.net/npm/[email protected]/fonts/
remixicon.css"rel="stylesheet"/>
<linkrel="stylesheet"
href="https://unpkg.com/boxicons@latest/css/boxicons.min.css">
</head>
<body>
<header>
<a href="#" class="logo"><i class="bx bxs-home-
smile"></i><span>Logo</span></a>
<ulclass="navbar">
<li><ahref="Nav.html"class="active">Home</a></li>
<li><ahref="AddBatch.html">AddBatch</a></li>
<li><ahref="AddParticipant.html">AddParticipant</a></li>
<li><ahref="UpdateBatch.html">UpdateBatch</a></li>
<li><ahref="UpdateParticipant.html">UpadteParticipant</a></li>
</ul>
<divclass="main">
<ahref="#"class="user"><iclass="bxbxs-user"></i>Signin</a>
<ahref="#">Contact</a>
<divid="menu-icon"><iclass="bxbx-menu"></i></div>
</div>
</header>
<section>
<formclass="form"method="post"action="addparticipant">
<fieldsetclass="fieldset">
<legend>@AddParticipant</legend>
<labelfor="addparticipantName">EnterYourName:</label>
<input type="text" id="addparticipantName"
name="participantname"placeholder="EnterYourName"required><br><br>
<labelfor="addparticipantAge">EnterYourAge:</label>
<input id="addparticipantAge" type="number"
name="participantage"placeholder="EnterYourAge"><br><br>
<labelfor="addparticipantHeight">EnterYourHeight:</label>
<input id="addparticipantHeight"
type="number"name="participantHeight"placeholder="EnterYourHeight"required><br><br>
<labelfor="addparticipantWeight">EnterYourWeight:</label>
<input id="addparticipantWeight"
type="number"name="participantweight"placeholder="EnterYourWeight"required><br><br>
<labelfor="addparticipantPhone">EnterYourPhoneNumber:</label>
<input id="addparticipantPhone"
type="number"name="participantnumber"placeholder="EnterYourPhoneNumber"required><
br><br>
<labelfor="addparticipantEmail">EnterYourEmail:</label>
<input id="addparticipantEmail"
type="email"name="participantemail"placeholder="EnterYourEmail"><br><br>
<labelfor="addparticipantDate">EnterYourJoiningDate:</label>
<input id="addparticipantDate" type="date"
name="participantDate"placeholder="EnterYourjoiningDate"required><br><br>
<labelfor="addparticipantTime">EnterYourBatchTime:</label>
<input id="addparticipantTime" type="time"
name="participanttime"placeholder="EnterYourTime"required><br><br>
<divclass="button">
<buttontype="submit">Submit</button>
<buttontype="reset">Reset</button>
</div>
</fieldset>
</form>
</section>
<scripttype="text/javascript"src="AddParticipant.js"></script>
</body>
</html>
Addbatchhtml:-
<!DOCTYPEhtml>
<htmllang="en">
<head>
<metacharset="UTF-8">
<metaname="viewport"content="width=device-width,initial-scale=1.0">
<title>Document</title>
<linkrel="stylesheet"href="AddBatch.css">
<linkhref="https://cdn.jsdelivr.net/npm/[email protected]/fonts/
remixicon.css"rel="stylesheet"/>
<link
rel="stylesheet"href="https://unpkg.com/boxicons@latest/css/boxicons.min.css">
</head>
<body>
<header>
<a href="#" class="logo"><i class="bx bxs-home-
smile"></i><span>Logo</span></a>
<ulclass="navbar">
<li><ahref="Nav.html"class="active">Home</a></li>
<li><ahref="AddBatch.html">AddBatch</a></li>
<li><ahref="AddParticipant.html">AddParticipant</a></li>
<li><ahref="UpdateBatch.html">UpdateBatch</a></li>
<li><ahref="UpdateParticipant.html">UpdateParticipant</a></li>
</ul>
<divclass="main">
<ahref="#"class="user"><iclass="bxbxs-user"></i>Signin</a>
<ahref="#">Contact</a>
<divid="menu-icon"><iclass="bxbx-menu"></i></div>
</div>
</header>
<!--<nav>
<ul>
<li><ahref="Nav.html">Home</a></li>
</ul>
</nav>-->
<section>
<formclass="form"method="post"action="addbatch">
<fieldsetclass="fieldset">
<legend>@AddBatch</legend>
<labelfor="addbatchName">EnterYourBatchName:</label>
<input type="text" id="addbatchName"
name="batchname"placeholder="EnterYourBatchName"required><br><br>
<labelfor="addbatchTime">EnterYourBatchTime:</label>
<input id="addbatchTime" type="time"
name="batchtime"placeholder="EnterYourBatchTime"required><br><br>
<divclass="button">
<buttontype="submit">AddBatch</button>
<buttontype="reset">Reset</button>
</div>
</fieldset>
</form>
</section>
<scripttype="text/javascript"src="AddBatch.js"></script>
</body>
</html>
UpdateBatch:-
<!DOCTYPEhtml>
<htmllang="en">
<head>
<metacharset="UTF-8">
<metaname="viewport"content="width=device-width,initial-scale=1.0">
<title>Document</title>
<linkrel="stylesheet"href="UpdateBatch.css">
<linkhref="https://cdn.jsdelivr.net/npm/[email protected]/fonts/
remixicon.css"rel="stylesheet"/>
<link
rel="stylesheet"href="https://unpkg.com/boxicons@latest/css/boxicons.min.css">
</head>
<body>
<header>
<a href="#" class="logo"><i class="bx bxs-home-
smile"></i><span>Logo</span></a>
<ulclass="navbar">
<li><ahref="Nav.html"class="active">Home</a></li>
<li><ahref="AddBatch.html">AddBatch</a></li>
<li><ahref="AddParticipant.html">AddParticipant</a></li>
<li><ahref="UpdateBatch.html">UpdateBatch</a></li>
<li><ahref="UpdateParticipant.html">UpdateParticipant</a></li>
</ul>
<divclass="main">
<ahref="#"class="user"><iclass="bxbxs-user"></i>Signin</a>
<ahref="#">Contact</a>
<divid="menu-icon"><iclass="bxbx-menu"></i></div>
</div>
</header>
<!--<nav>
<ul>
<li><ahref="Nav.html">Home</a></li>
</ul>
</nav>-->
<section>
<formclass="form"method="post"action="updatebatch">
<fieldsetclass="fieldset">
<legend>@UpdateBatch</legend>
<labelfor="updatebatchName">EnterYourNewBatchName: </label>
<input type="text" id="updatebatchName"
name="newbatchname"placeholder="EnterYourNewBatchName"required><br><br>
<labelfor="updatebatchTime">EnterYourNewBatchTime: </label>
<input id="updatebatchTime" type="time"
name="newbatchtime"placeholder="EnterYourNewBatchTime"required><br><br>
<divclass="button">
<buttontype="submit">Update</button>
<buttontype="reset">Reset</button>
</div>
</fieldset>
</form>
</section>
<scripttype="text/javascript"src="UpdateBatch.js"></script>
</body>
</html>
UpdateParticipant:-
<!DOCTYPEhtml>
<htmllang="en">
<head>
<metacharset="UTF-8">
<metaname="viewport"content="width=device-width,initial-scale=1.0">
<title>YaminGym </title>
<linkrel="stylesheet"href="UpdateParticipant.css">
<linkhref="https://cdn.jsdelivr.net/npm/[email protected]/fonts/
remixicon.css"rel="stylesheet"/>
<link
rel="stylesheet"href="https://unpkg.com/boxicons@latest/css/boxicons.min.css">
</head>
<body>
<header>
<a href="#" class="logo"><i class="bx bxs-home-
smile"></i><span>Logo</span></a>
<ulclass="navbar">
<li><ahref="Nav.html"class="active">Home</a></li>
<li><ahref="AddBatch.html">AddBatch</a></li>
<li><ahref="AddParticipant.html">AddParticipant</a></li>
<li><ahref="UpdateBatch.html">UpdateBatch</a></li>
<li><ahref="UpdateParticipant.html">UpdateParticipant</a></li>
</ul>
<divclass="main">
<ahref="#"class="user"><iclass="bxbxs-user"></i>Signin</a>
<ahref="#">Contact</a>
<divid="menu-icon"><iclass="bxbx-menu"></i></div>
</div>
</header>
<section>
<formclass="form"method="post"action="updateparticipant">
<fieldsetclass="fieldset">
<legend>@UpdateParticipant</legend>
<labelfor="updateparticipantAge">EnterYourNewAge:</label>
<input id="updateparticipantAge"
type="number"name="newparticipantage"placeholder="EnterYourNewAge"><br><br>
<labelfor="updateparticipantHeight">EnterYourNewHeight:
</label>
<inputid="updateparticipantHeight"type="number"
name="newparticipantHeight"placeholder="EnterYourNewHeight"required><br><br>
<labelfor="updateparticipantWeight">EnterYourNewWeight:
</label>
<inputid="updateparticipantWeight"type="number"
name="newparticipantweight"placeholder="EnterYourNewWeight"required><br><br>
<labelfor="updateparticipantPhone">EnterYourNewPhoneNumber:
</label>
<inputid="updateparticipantPhone"type="number"
name="newparticipantnumber" placeholder="Enter Your New
PhoneNumber"required><br><br>
<labelfor="updateparticipantTime">EnterYourNewBatchTime:
</label>
<inputid="updateparticipantTime"type="time"
name="newparticipanttime"placeholder="EnterYourNewBatchTime"required><br><br>
<divclass="button">
<buttontype="submit">Submit</button>
<buttontype="reset">Reset</button>
</div>
</fieldset>
</form>
</section>
<scripttype="text/javascript"src="UpdateParticipant.js"></script>
</body>
</html>
CSS:-
*{
padding:0;
margin:0;
box-sizing:border-box;
font-family: 'Poppins', sans-
serif;text-decoration:none;
list-style:none;
}
:root{
--bg-color:#f0f2f5;
--text-color:magenta;
--main-color:rgb(157,225,63);
}
body{
min-height:
100vh;background: var(--bg-
color);color:var(--text-
color);
}
header{
position:
fixed;width:100%
;
top:0;
right:0;
z-index:
1000;display:
flex;align-
items:center;
justify-content: space-
between;background:
transparent;padding:28px12%;
transition: all .50s
ease;background-
color:#222327;
}
.logo{
display: flex;align-
items:center;
}
.logoi{
color: var(--main-
color);font-size:28px;
margin-right:3px;
}
.logospan{
color: var(--text-
color);font-size:1.7rem;
font-weight:600;
}
.navbar{
display:flex;
}
.navbara{
color: var(--text-
color);font-size:1.1rem;
font-weight:500;
padding: 5px
0;margin:0px30px;
transition:all.50sease;
}
.navbara:hover{
color:var(--main-color);
background: linear-gradient(45deg, #4f1919,
#ff3333);border-radius:8px;
}
.navbara.active{
color:var(--main-color);
}
.main{
display: flex;align-
items:center;
}
.maina{
margin-right:
25px;margin-
left:10px;color: var(--
text-color);font-
size:1.1rem;
font-weight:
500;transition:all.50sease
;
}
.user{
display: flex;align-
items:center;
}
.useri{
color: var(--main-
color);font-size:28px;
margin-right:7px;
}
.usera:hover{
color:var(--main-color);
}
#menu-icon{
font-size:35px;
color: var(--text-
color);cursor:pointer;
z-index:
10001;display:n
one;
}
@media(max-width:1280px)
{
header{
padding:14px2%;
transition:.2s;
}
.navbara{
padding: 5px
0;margin:0px20px;
}
}
@media(max-width:1090px)
{
#menu-icon{
display:block;
}
.navbar{
position:
absolute;top:100%;
right: -
100%;width:
270px;height:
29vh;
background: var(--main-
color);display:flex;
flex-direction:
column;justify-content:
flex-start;border-radius:
10px;transition:all.50sease;
}
.navbara{
display:
block;margin: 12px
0;padding:0px25px;
transition:all.50sease;
}
.navbara:hover{
color: var(--text-
color);transform:translateY(5p
x);
}
.navbara.active{
color:var(--text-color);
}
.navbar.open{
right:2%;
}
}
.form{
/*text-align:
center;*/color:black;
display:flex;
justify-content:
center;background:
#f0f2f5;min-
height:400px;
}
.fieldset{
height: 150px;width:380px;
background-color: white;border-radius: 8px;border-color: white;border:none;
box-shadow: 0 2px 4px rgba(0, 0, 0, .1), 0 8px 16px rgba(0, 0, 0, .1);margin:auto;
padding:7px0 8px7px;
}
.button{
display: flex;align-items:center;
justify-content: space-around;margin-top:5px;
}
.buttonbutton{
font-family: inherit;color:black;
border-radius: 6px;background-color: #1877f2;padding:016px;
}
.buttonbutton:hover{
box-shadow:005px cyan,
00 25pxcyan, 00 50pxcyan,
00100px cyan,0 0200px cyan;
background:linear-gradient(var(--x),#00ccff,#0e1538,#d400d4);
}