Guest_imported
New member
- Jan 1, 1970
- 0
I’m trying to lit web user to enter a keyword. The system then produce table includes movie title, release year, rating, and review but for all movies with that keyword in the title.
But I’m missing something can anyone help
============================================
<html>
<H1>Movies Genres list</H1>
<%
Dim adOpenForwardOnly, adLockReadOnly, adCmdTable
adOpenForwardOnly=0
adLockReadOnly=1
adCmdTable=2
adCmdText=1
Dim objConn, GenRS, GenSQL,vGENRE
Set objConn = Server.CreateObject("ADODB.Connection"
Set GenRS = Server.CreateObject("ADODB.Recordset"
vGENRE = request.form("title"
objConn.Open "File Name=f:\Studentwebs\salqahtan\myconnection.udl"
genSQL = "Select title,released,rating,review from movies where title like upper('%&vGENRE&%')"
GenRS.open GenSQL, objConn, adOpenForwardOnly, adLockReadOnly, AdCmdText
'here is my problem
response.write("<form action=' method='POST'>"
vGENRE="title"
genRS.find vGENRE
response.write("<INPUT TYPE=TEXT NAME='title' size=25>"
response.write("</select>"
response.write("<input type='submit' value='<-- Search for movie'>"
response.write("</form>"
%>
<%
response.write("<body style='border-style: outset; border-width: 2'><table border=1 cellspacing=1 width=100% id='AutoNumber1' style=color: #FFFFFF; border-style: groove; border-width: 3 bordercolor=#DFCAAA bordercolorlight=#C0C0C0 bordercolordark=#FFFFFF bgcolor=#D7EAE7>"
response.write("<TR>"
response.write("<TD align=left height=20 width='55%' bgcolor='#A7D1CB'>"
response.write("<big><font color='#5E85B0'>Title</font></big></TD>"
response.write("<TD align=left height=20 width='15%' bgcolor='#A7D1CB'>"
response.write("<big><font color='#5E85B0'>Released Year</font></big></TD>"
response.write("<TD align=left height=20 width='20%' bgcolor='#A7D1CB'>"
response.write("<big><font color='#5E85B0'>Rating</font></big></TD>"
response.write("<TD align=left height=20 width='10%' bgcolor='#A7D1CB'>"
response.write("<big><font color='#5E85B0'>Review</font></big></TD>"
response.write("</TR>"
%> <%
while not genRS.eof
response.write("<TR>"
response.write("<TD>" & movgRS("title"
& "</TD>"
response.write("<TD>" & movgRS("released"
& "</TD>"
response.write("<TD>" & movgRS("rating"
& "</TD>"
response.write("<TD>" & movgRS("review"
& "</TD>"
response.write("</TR>"
genRS.movenext
Wend
response.write("</table></BIG>"
GenRS.close
objConn.close
Set GenRS = Nothing
Set objConn = Nothing
%>
<BR><HR>
</HTML>
But I’m missing something can anyone help
============================================
<html>
<H1>Movies Genres list</H1>
<%
Dim adOpenForwardOnly, adLockReadOnly, adCmdTable
adOpenForwardOnly=0
adLockReadOnly=1
adCmdTable=2
adCmdText=1
Dim objConn, GenRS, GenSQL,vGENRE
Set objConn = Server.CreateObject("ADODB.Connection"
Set GenRS = Server.CreateObject("ADODB.Recordset"
vGENRE = request.form("title"
objConn.Open "File Name=f:\Studentwebs\salqahtan\myconnection.udl"
genSQL = "Select title,released,rating,review from movies where title like upper('%&vGENRE&%')"
GenRS.open GenSQL, objConn, adOpenForwardOnly, adLockReadOnly, AdCmdText
'here is my problem
response.write("<form action=' method='POST'>"
vGENRE="title"
genRS.find vGENRE
response.write("<INPUT TYPE=TEXT NAME='title' size=25>"
response.write("</select>"
response.write("<input type='submit' value='<-- Search for movie'>"
response.write("</form>"
%>
<%
response.write("<body style='border-style: outset; border-width: 2'><table border=1 cellspacing=1 width=100% id='AutoNumber1' style=color: #FFFFFF; border-style: groove; border-width: 3 bordercolor=#DFCAAA bordercolorlight=#C0C0C0 bordercolordark=#FFFFFF bgcolor=#D7EAE7>"
response.write("<TR>"
response.write("<TD align=left height=20 width='55%' bgcolor='#A7D1CB'>"
response.write("<big><font color='#5E85B0'>Title</font></big></TD>"
response.write("<TD align=left height=20 width='15%' bgcolor='#A7D1CB'>"
response.write("<big><font color='#5E85B0'>Released Year</font></big></TD>"
response.write("<TD align=left height=20 width='20%' bgcolor='#A7D1CB'>"
response.write("<big><font color='#5E85B0'>Rating</font></big></TD>"
response.write("<TD align=left height=20 width='10%' bgcolor='#A7D1CB'>"
response.write("<big><font color='#5E85B0'>Review</font></big></TD>"
response.write("</TR>"
%> <%
while not genRS.eof
response.write("<TR>"
response.write("<TD>" & movgRS("title"
response.write("<TD>" & movgRS("released"
response.write("<TD>" & movgRS("rating"
response.write("<TD>" & movgRS("review"
response.write("</TR>"
genRS.movenext
Wend
response.write("</table></BIG>"
GenRS.close
objConn.close
Set GenRS = Nothing
Set objConn = Nothing
%>
<BR><HR>
</HTML>