Current File : //home/obabain/khb_obaba_in/SupplierItemDA.jsp
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
     <%@ include file="Connection.jsp" %>
      <%
      String loginid=(String)session.getAttribute("logid");

 %>
 
 <%--  <%!
 String clname=null;  %>
 
<%Statement st=con.createStatement(); 
ResultSet rs= null;
  id=request.getParameter("Id");
 rs=st.executeQuery("select * from ip_clients where client_id="+id+"");
 while(rs.next())
 {
 clname=rs.getString("client_name");
 }
%>   --%>
<!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>
 <%
  try
   {
	  String supplier=request.getParameter("supplier"); 
	  String supplierid=request.getParameter("supplierid"); 
	  
	  
	  
	  
	
	  String[] a=null;String[] b=null;String[] c=null;String[] d=null;String[] f=null;
		a=request.getParameterValues("product[]");
		b=request.getParameterValues("prate[]");
		c=request.getParameterValues("pqty[]");
		d=request.getParameterValues("mtransport[]");
		f=request.getParameterValues("unit[]");
 
 /*  Statement stm=con.createStatement(); */
		for(int j=1;j<a.length;j++){
			Statement st=con.createStatement(); 
			int l=st.executeUpdate("insert into ip_supplier_product(supplier_id,s_name,product,s_product_rate,s_pro_qty,mode_of_transport,unit,branch_id) values('"+supplierid+"','"+supplier+"','"+a[j]+"','"+b[j]+"','"+c[j]+"','"+d[j]+"','"+f[j]+"','"+loginid+"')");
		
	}
 
  response.sendRedirect("ViewSupplier.jsp"); 
}
catch(Exception el){
	out.println(el);
}

%>



</body>
</html>