%--
Document : register
Created on : Dec 9, 2013, 12:49:49 PM
Author : aqfaridi
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@page import="java.sql.*,connection.Config" %>
<%
String id = request.getParameter("id");
Config c = new Config();
Connection con = c.getcon();
Statement st = con.createStatement();
String qry = "SELECT * FROM askquestions WHERE id='"+id+"'";
ResultSet rs = st.executeQuery(qry);
if(rs.next())
{
out.println("
");
out.println("Question Title: "+rs.getString("questiontitle")+"
");
out.println("Question Code: " + rs.getString("questioncode"));
out.println("
");
out.println(rs.getString("questiondescription")+"
");
out.println("
Asked By : "+rs.getString("username")+" "+rs.getString("time")+"
");
}
%>
<%
qry = "SELECT * FROM commentquestions WHERE id='"+id+"' ORDER BY Sno DESC";
rs = st.executeQuery(qry);
while(rs.next())
{
%>
<%=rs.getString("username")%>
<%=rs.getString("time")%>
<%=rs.getString("comment")%>
<%}
if(User!=null)
{
%>
Leave a Comment
<%}
con.close();
%>