Current File : //home/obabain/public_html/abc/Tempareture.jsp
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
           <%@ include file="Connection.jsp" %>
           <%! String ab=null; %>
    <%  
    Statement st1=con.createStatement();
    String id=request.getParameter("Id");
    ResultSet rs=st1.executeQuery("select * from ip_products  where product_id="+id+"");
    while(rs.next())
    {
    ab=rs.getString("product_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>
<style type="text/css">
.rrow
{
 display: inline-block;
   margin: 30px;
}    
</style>
</head>
<%@include file="master.jsp" %>

<body>
    <div class="row">
        <div class="col-md-9">
            <div class="panel panel-default">
              <div class="panel-heading main-color-bg">
                <h3 class="panel-title">Quality Plan for foundry process Control(Temperature)</h3>
              </div>
              <div class="panel-body">
              
              
               <form action="" method="post">
     
            <div> 
            <%--   <a href="mechanicalproperty.jsp?Id=<%=rs.getString("product_id")%>"> --%>
              <a href="Temparature_view.jsp?Id=<%=id%>" style="margin-left:905px;" class="btn btn-primary">View</a>
            </div>
      <br><br>
      
  <div class="form-group"  style="margin-left:200px;"> 
     <div class="row">
     
      <!--  <div class="col-sm-3">
           <label for="">Sl No:</label>
           <input type="text" class="form-control"  id=""  name="no" placeholder="">
        </div>  -->

   
   
        <div class="col-sm-3">
           <label for="">Material Grade:</label>
           <input type="text" class="form-control"  value="<%=ab%>"   id=""  name="material_grade" placeholder="">     
        </div>
        
        
         <div class="col-sm-4">
              <label for="">Tapping Temperature(In Degree C):</label>
              <input type="text" class="form-control"  id=""  name="temp" placeholder="">
         </div>
        
      </div>
   </div>
           <br><br>  

     <div class="modal-footer" id="contact_submit">
       <!-- <input type="button" onclick="goBack()" value="Back"  class="btn btn-primary" style="margin-right:655px"> -->
        <a href="ViewProduct.jsp" style="margin-right:655px;" class="btn btn-primary">Back</a>
       <a class="btn btn-primary"  href="">Reset</a>      
       <button type="submit" class="btn btn-primary" >Save Changes</button>
     </div> 
     
             <%
         /*  String no=request.getParameter("no"); */
             String material_grade=request.getParameter("material_grade");
             String temp=request.getParameter("temp");      
             %>

             <%
			  try
               {
    	        if(material_grade!=null ||material_grade.length()!=0)
    	         {
    	          Statement st=con.createStatement(); 
                  int i=st.executeUpdate("insert into quality_plan(material_grade,temp,product_id)values('"+material_grade+"','"+temp+"','"+id+"')");
                  out.println("");
                  }
               }
               catch(Exception e)
               {
                System.out.print(e);
                e.printStackTrace();
               }   
			%> 
     
     
  </form>
             
              </div>
              <br><br><br><br><br>
            </div>
          </div>
        </div>
        <script type="text/javascript">
  function goBack() 
  {
   window.history.back(); 
  };
</script>
</body>
</html>