can u debug this statement..... i dunno why i cant display the dates...... i have 2 drop down boxes ....one displayin the mth and the other year.....
<select name="sel_month" size="1">
<% Do until rs.EOF %>
<option value='<%=rs("id"
%>' selected><%=rs("mnth"
%></option>
<% rs.MoveNext %>
<% loop %>
</select>
<%
rs.close
rs.open "SELECT * FROM years ", obconn
%>
<select name="sel_year" size="1">
<% Do until rs.EOF %>
<option value='<%=rs("year"
%>' selected><%=rs("year"
%></option>
<% rs.MoveNext %>
<% loop %>
</select>
this is the page where u should display the information where u choose the specific dates...
<%
set Sdate ="1/" & request.querystring("sel_month"
set Edate ="31/" & request.querystring("sel_month"
response.write(Sdate)
response.write(Edate)
Dim obconn, obrs
set obconn=Server.CreateObject("ADODB.Connection"
obconn.Provider="Microsoft.Jet.OLEDB.4.0"
obconn.Open(Server.Mappath("../database/ertDB.mdb"
)
set obrs=Server.CreateObject("ADODB.Recordset"
if request.querystring("select2"
="1" then
if request.querystring("CHOICE3"
<>"" then
obrs.open "SELECT * FROM posts WHERE title LIKE '%" & request.querystring("Title"
& "%'", obconn
end if
if request.querystring("choice2"
<>"" then
obrs.open"SELECT * FROM posts WHERE date BETWEEN '" & request.querystring("select"
& "'", obconn
end if
if request.querystring("choice"
<>"" then
obrs.open"SELECT * FROM posts WHERE title LIKE '" & request.querystring("search"
& "%'", obconn
end if
if obrs.EOF then
response.write("<br>The information '" & request.querystring("Title"
& "' you are searching in News and Updates is not unavailable in our database!!! <br> Plesase try again!!"
else
Do until obrs.EOF %>
<select name="sel_month" size="1">
<% Do until rs.EOF %>
<option value='<%=rs("id"
<% rs.MoveNext %>
<% loop %>
</select>
<%
rs.close
rs.open "SELECT * FROM years ", obconn
%>
<select name="sel_year" size="1">
<% Do until rs.EOF %>
<option value='<%=rs("year"
<% rs.MoveNext %>
<% loop %>
</select>
this is the page where u should display the information where u choose the specific dates...
<%
set Sdate ="1/" & request.querystring("sel_month"
set Edate ="31/" & request.querystring("sel_month"
response.write(Sdate)
response.write(Edate)
Dim obconn, obrs
set obconn=Server.CreateObject("ADODB.Connection"
obconn.Provider="Microsoft.Jet.OLEDB.4.0"
obconn.Open(Server.Mappath("../database/ertDB.mdb"
set obrs=Server.CreateObject("ADODB.Recordset"
if request.querystring("select2"
if request.querystring("CHOICE3"
obrs.open "SELECT * FROM posts WHERE title LIKE '%" & request.querystring("Title"
end if
if request.querystring("choice2"
obrs.open"SELECT * FROM posts WHERE date BETWEEN '" & request.querystring("select"
end if
if request.querystring("choice"
obrs.open"SELECT * FROM posts WHERE title LIKE '" & request.querystring("search"
end if
if obrs.EOF then
response.write("<br>The information '" & request.querystring("Title"
else
Do until obrs.EOF %>