Current File : /home/obabain/public_html/abc/subprocess_p2.jsp |
<%@page import="java.sql.*" %>
<%@include file="Connection.jsp" %>
<%
String a="";
System.out.println("hai");
a=request.getParameter("country_id");
if(request.getParameter("country_id")!=null)
{
System.out.println(request.getParameter("country_id"));
int id=Integer.parseInt(request.getParameter("country_id")); //get country_id from index.jsp page with function country_change() through ajax and store in id variable
System.out.println(id);
try
{
PreparedStatement pstmt=null ; //create statement
pstmt=con.prepareStatement("SELECT * FROM ip_furnace where product="+id); //sql select query
ResultSet rs=pstmt.executeQuery(); //execute query and set in resultset object rs.
%>
<%
while(rs.next())
{
%>
<option value="<%=rs.getInt("m_id")%>">
<%=rs.getString("heat_no")%>
</option>
<%
}
}
catch(Exception e)
{
out.println(e);
}
}
%>