Current File : /home/obabain/khb_obaba_in/editProductfamily.jsp
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    <%String gname=request.getParameter("name"); %>
    <%@ include file="Connection.jsp" %>
<!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>
<%@include file="master.jsp" %>
<form action="" method="post">

<div class="content">
<div class="row">
<div class="col-md-9"  style="width:50%;background-color:white;">
<div class="panel panel-default" >
       <div class="panel-heading main-color-bg">
        <h3 class="panel-title">Add Tax Rate</h3>
              </div>
             </div>
              <div class="panel-body">
              <div>
              Family Name
           <input type="text" name="famname" class="form-control txtstylesmall" value="<%=gname %>">
</div>
<br>
          

<div class="modal-footer" id="contact_submit">
<a style="background:#204b58" class="btn btn-info pull-left"  onclick="goBack()">Back</a>
<a class="btn btn-default" href="AddTax.jsp">Reset</a>
<input type="submit" value="Save Changes" class="btn btn-info" style="background:#204b58">
 

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

<%
try
{
	
	Statement st=con.createStatement();
	String fname=request.getParameter("famname");
	String id=request.getParameter("Id");
	if(fname.length()!=0|| fname!=null)
	{
	int i=st.executeUpdate("update  ip_families set family_name='"+fname+"' where family_id="+id+"");
	response.sendRedirect("ViewProductCategory.jsp");
	}
}
catch(Exception el){}
%>
</div>
</div>

</form>
<script type="text/javascript">
function validate()
{
	  var t1=document.proform.famname.value;
	  if(t1=="" || t1==null)
		  alert('insert name')
	  
	  
}
</script>
<script type="text/javascript">
function goBack() {
    window.history.back();
   
};
</script>
</body>
</html>