<%@page import="java.sql.ResultSet" %> <%@page import="java.sql.DriverManager" %> <%@page import="java.sql.Statement" %> <%@page import="java.sql.Connection" %> <%@page contentType="text/html" pageEncoding="UTF-8"%> <% try { Class.forName("com.mysql.jdbc.Driver"); Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/ifastdem_webmsnt","ifastdem_admin","P@s$w()rd"); Statement st = con.createStatement(); String sql = "SELECT * FROM berita ORDER BY id DESC"; ResultSet rs = st.executeQuery(sql); while (rs.next()){ String filename = rs.getString("filename"); String details = rs.getString("details"); String tarikh = rs.getString("tarikh"); String title = rs.getString("title"); %> Laman Web Rasmi MAJLIS SUKAN NEGERI TERENGGANU



<%=title%>

Oleh : Admin





<%=details%>

KEMBALI

<% } } catch (Exception e){ out.println(e); } %>