diff --git a/web/Admin-Panel/Location/index.jsp b/web/Admin-Panel/Location/index.jsp index 0e9c959..7127000 100644 --- a/web/Admin-Panel/Location/index.jsp +++ b/web/Admin-Panel/Location/index.jsp @@ -4,6 +4,11 @@ Author : Alpin J --%> + +<%@page import="java.sql.ResultSet"%> +<%@page import="java.sql.Statement"%> +<%@page import="java.sql.Connection"%> +<%@page import="java.sql.DriverManager"%> <%@page contentType="text/html" pageEncoding="UTF-8"%> @@ -46,11 +51,9 @@
@@ -68,13 +71,44 @@

List Of Location

- + + <% + try + { + String Query="select * from province"; + Class.forName("com.mysql.jdbc.Driver").newInstance(); + Connection conn=DriverManager.getConnection("jdbc:mysql://localhost:3306/travlendardb","root",""); + Statement stm=conn.createStatement(); + ResultSet rs=stm.executeQuery("select distinct PROVINCE_CODE, PROVINCE_NAME from province"); + while(rs.next()) + { + + %> + + <% + out.println("KODE : " + rs.getString("PROVINCE_CODE")); + + } + // conn.close(); + // rs.close(); + } + catch (Exception ex) + { + ex.printStackTrace(); + out.println("Error" + ex.getMessage()); + } + + %> + +