Current File : /home/obabain/public_html/abc/ProductMultiSelect.jsp
<%@ page language="java" import="java.sql.*" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    <%@page import="java.sql.*" %>
   
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link rel="shortcut icon" type="image/x-icon" href="img/ico.ico" />
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <link href="css/estilos.css" rel="stylesheet">
    <script src="http://cdn.ckeditor.com/4.6.1/standard/ckeditor.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Product</title>
</head>
<body>
<form name=myname method=post action="PurchaseOrder.jsp">
<section id="main">
			<div class="container">
			 <div class="row">
			<div class="panel panel-default">
          <div class="col-md-8">
<table class="table table-striped" >
<thead>
<tr>
<td><b><u>p_id</u></b></td>
<td><b><u>P Name</u></b></td>
<td><b><u>Weight</u></b></td>
<td><b><u>Quentity</u></b></td>

</tr>
</thead>

<tr>



<%try{

Connection conn = null;
Class.forName("com.mysql.jdbc.Driver").newInstance();
conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/erpdemo","root", "");
ResultSet rs = null;
Statement st=null;
st=conn.createStatement();
rs = st.executeQuery("select * from ip_products");
int i=0; while(rs.next()){ %>
<tr><td><input type="checkbox" name="check[]" value="<%= rs.getString("product_id") %>"></td>
<td><%= rs.getString("product_name") %></td>
<td><%=rs.getString("product_description") %></td>
	<td><%=rs.getString("product_price") %></td>
</tr><%
i++;
}
}catch(SQLException e){ System.out.println(e.getMessage()); } %>
</table>
<input type="submit" onclick="returnYourChoice1()">


</table>


<script type="text/javascript">
    // return the value to the parent window
    function returnYourChoice1(){
        //opener.setSearchRslt(targetField,targetField2,targetField3,targetField4,targetField5,targetField6,choice,choice2,choice3,choice4,choice5,choice6);
        window.close();
    }
</script>
</div>
</div>
</div>
</div>
</section>
</form>
</body>
</html>