<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ page import ="com.dao.CategoriesDao" %> 
<%@ page import ="com.entities.Categories" %> 
<%@ page import ="com.artifacts.FactoryProvider" %> 
<%@ page import ="java.util.List" %>       
<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<div class="cardc">
        <div class="admins-body">
        <form action="CategoriesTitle" method="post">
            <div class="info">        
           <input type="hidden" name="operation" value="addcategory">       
           <input name="Ctitle" type="text" placeholder="Enter Category" required>
           </div>
           <%
           CategoriesDao cdao =new CategoriesDao(FactoryProvider.getFactory());
           List<Categories>list = cdao.getCategoriees();
           
           
           %>
           
          
         
           
          
           <div class="selection">
          
           <select name="catId" id="">
           <% 
           for(Categories c:list){
           %>
          
           <option value="<%=c.getCategoriesId()%>"> <%=c.getCategoriesTitle() %> </option>
           
           <%} %>
           
           </select>
           </div>
           
           
           <button>Add</button>
        </form>
        
        </div>
        
        </div>

</body>
</html>