Current File : //home/obabain/public_html/abc/editTask_template.jsp
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
     <%@ include file="Connection.jsp" %>
     <%
    String id=request.getParameter("Id");
    Statement sdet=con.createStatement();
    ResultSet rd=sdet.executeQuery("SELECT * FROM task_template where id="+id+"");
    while(rd.next())
    {
    %>
    <%!int id;%>
     
     
     
     
     
     
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<form method="post">
<%@include file="master.jsp" %>
<div class="content">
<div class="row">
<div class="col-md-9" style="background-color:white;">
<div class="panel panel-default" >
       <div class="panel-heading main-color-bg">
        <h3 class="panel-title">Task Templates</h3>
              </div>
             </div>
             <div class="headerbar-item pull-right">
 
<!-- <a href="ViewQC.jsp" style="background:#204b58" class="btn btn-info">View</a> -->
 
</div>
              <div class="row">
             <div class="form-group col-xs-3">
            <div class="onerow">
              Template ID
           <input type="text" name="template"  value="<%=rd.getString("template_id") %>" class="form-control input-group-lg reg_name" style="width:200px;margin:5px;">              
</div>
</div>
<div class="form-group col-xs-3">
            <div class="onerow">
              Description:
           <input type="text" name="desc" value="<%=rd.getString("description") %>"class="form-control input-group-lg reg_name" style="width:200px;margin:5px;">              
</div>
</div>
<%} %>
 <div class="row">
 
</div>
 <div class="modal-footer" id="contact_submit">
   <a class="btn btn-info" style="margin-right:825px;" onclick="goBack()">Back</a>
       <!--  <a class="btn btn-default" href="tasktemplate.jsp">Reset</a> --> 
       <input type="submit" name="save"  style="margin-right:5px;"class="btn btn-success">
        
      </div>
</div>

<%
try{
String t_id=request.getParameter("template");
String den=request.getParameter("desc");
/* String status=request.getParameter("status");
String redir=request.getParameter("redirect");
String order=request.getParameter("sorder"); */

if(t_id.length()!=0 ||t_id!=null)
{
	Statement stm=con.createStatement();
int i=stm.executeUpdate("update task_template set template_id='"+ t_id+"',description='"+den+"' where id="+id+"");
response.sendRedirect("view_task_template.jsp");
}
}
catch(Exception el){}

%> 
</div>
</div>
<%@include file="footer.jsp" %>
</form>
<script type="text/javascript">
function goBack() {
    window.history.back();
   
};
</script>
</body>
</html>