Hi i really hope someone can help me i am a complete newbie at asp iv never seen the lanuage until 3days ago, im having to learn it really fast and its really confusing me, I have to create a forum on a web page, i have my database set up and some coding already but im realy stuck. I have the first thread of a subject hyperlinked with the date, replies and view in a table with it and im trying to code the part where you click on the hyperlinked text and the relevant info will show.
Here is my code:
Code:
<% Option Strict On %>
<html>
<head>
<title>Forum</title>
</head>
<body>
<%
Dim conn
dim rs
Set conn=Server.CreateObject ("ADODB.Connection")
conn.Open "Provider=sqloledb;Data Source=(LOCAL);Initial Catalog=test;Integrated Security=SSPI;"
Set rs=Server.CreateObject ("ADODB.recordset")
rs.open "SELECT Subject, Date, Replies, Views FROM Forum_post Where ParentID is Null", conn
%>
<table border="1" width="80%" ID="Table1">
<tr>
<%for each x in rs.Fields
response.write("<th>" & x.name & "</th>")
next%>
</tr>
<%Do while not rs.eof%>
<tr>
<td><a href="showmessage.asp?ID="><%=rs("subject")%></a></td>
<td><%Response.Write rs("Date")%></td>
<td><%Response.Write rs("Replies")%></td>
<td><%Response.Write rs("Views")%></td>
<% rs.movenext
loop%>
</tr>
</table>
rs.open "Select * FROM forum_post WHERE id=" & request.querystring("id")", conn
</body>
</html>
Please can someone help me with this??? 
|