<%@page import="java.sql.*"%> <%! Connection con=null; PreparedStatement pst=null; ResultSet rs=null; %>
 
<% try { Class.forName("com.mysql.jdbc.Driver"); con=DriverManager.getConnection("jdbc:mysql://localhost:3306/sandeep","sandeepguleria","guleriasandeep"); pst=con.prepareStatement("select * from blog"); rs=pst.executeQuery(); out.println("

"); //out.println( ""); while(rs.next()) { out.println(""); out.println(""); // out.println(rs.getString(2)); } } catch(Exception e) { out.println("exception is:=="+e); } out.println("
"+rs.getString(2)+"
"+rs.getString(3)+"
"); %>


<%@page import="java.sql.*"%> <% out.println(" "); out.println(" "); out.println(""); out.println(" "); out.println(" "); out.println("
"+"Comments Posted by Users"+" 
"); Connection con=null; Statement pst=null; ResultSet rs=null; try { Class.forName("com.mysql.jdbc.Driver"); con=DriverManager.getConnection("jdbc:mysql://localhost:3306/sandeep","sandeepguleria","guleriasandeep"); pst=con.createStatement(); rs=pst.executeQuery("select * from comment"); out.println(" "); out.println("
"); while(rs.next()) { /* Sandeep*/ out.println("


"); out.println("
"+rs.getString(2) +"
"); out.println("
"+rs.getString(4) +"
"); out.println("
"+rs.getString(3) +"
"); out.println("
"); } } catch(Exception e) { out.println("exception is:=="+e); } out.println("
"); %>
          
<% String msg=request.getParameter("msg"); if(msg!=null){ %> <% } %>

Not a member..?Click here Join our network..
;
Login
Login To Post Comments
Email :
Password :