Current File : /home/obabain/public_html/abc/edit_element.jsp
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
           <%@ 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>
<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" style="background-color:green;color:#00FF00;height:40px;"> -->
              <div class="panel-heading main-color-bg" style="height:40px;">  
              </div>
              <div class="panel-body">

   <form action="update_element.jsp"  method="post" id="" name="">
  
       <%
       try
       {
    	String id=request.getParameter("id");	   
	    Statement st=con.createStatement();
	    ResultSet resultSet = st.executeQuery("select * from elements where id="+id+"");
        while(resultSet.next())
        {
       %>
          
     <br> 
      
    <div class="form-group"> 
     <div class="row">
          <input type="hidden" value="<%=id%>" name="id">               <!--  important -->
        <div class="col-sm-3">
           <label for="">Element:</label>
           <input type="text" class="form-control"  value="<%=resultSet.getString("Element")%>" id=""  name=create_element>
        </div> 

      </div>
   </div>
   
      <br>   
   
       <input type="submit" value="Update" class="btn btn-primary" style="margin-left:430px;">
        <%
        }
       }
    
       catch(Exception e) 
       {
        e.printStackTrace();
       }
    %>  
 </form> 
      
              </div>
              <br>
            </div>
          </div>
        </div>
        <script type="text/javascript">
  function goBack() 
  {
   window.history.back(); 
  };
</script>
</body>
</html>