Advertified

<%@ page import="java.sql.*" %>
<%try{ Class.forName("oracle.jdbc.driver.OracleDriver"); Connection con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe","classified","classified"); String query="select name,email,address,contact from registered where id=?"; PreparedStatement ps=con.prepareStatement(query); int id=(Integer)session.getAttribute("userid"); ps.setInt(1,id); ResultSet rs=ps.executeQuery(); rs.next(); %>

Welcome <%=rs.getString(1)%>

Name :<%=rs.getString(1)%>
Email :<%out.print(rs.getString(2));%>
Address :<%out.print(rs.getString(3));%>
Contact :<%out.print(rs.getString(4));%>
<% }catch(Exception e){e.printStackTrace();} %> <%@ include file="footer.html"%>
www.000webhost.com