Basically have this problem on two of my asp pages. Both have tables and after them I want to force a line break before i insert my home page link. However this isn't working and I cant see why, I thought I perhaps hadn't closed a set of tags but looks like i've closed everything in both to me! Can anyone help?
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>index.html</title>
<link rel="stylesheet" type="text/css" media="screen" href="P7.css" />
</head>
<body>
<%rating = Request.Form("rating")%>
<%parking = Request.Form("parking")%>
<%swimmingPool = Request.Form("swimmingPool")%>
<%bar = Request.Form("bar")%>
<%
'set up a connection to the database
dbname = "db/Scotland.accdb"
connStr = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source="
connStr = connStr & Server.MapPath(dbname)
'create a connection object
Set connect = Server.CreateObject("ADODB.Connection")
'create a record set object in which the results of the query will be stored
Set results = Server.CreateObject("ADODB.Recordset")
connect.Open(connStr)
'build an SQL statement
sql = "SELECT * FROM hotels WHERE rating= " & rating & " "
If Request.Form("parking") = "yes" Then sql = sql & "AND parking = True "
If Request.Form("swimmingPool") = "yes" Then sql = sql & "AND swimmingPool = True "
If Request.Form("bar") = "yes" Then sql = sql & "AND bar = True "
'retrieve fields from the database (using SQL statement)
results.open sql, connect, 3, 3
%>
<h4>HotelNet.com</h4>
<div class = "middle">
<h3>Search Results</h3>
<p>Results found for <%=rating%> star hotels with the following facilities:</p>
<ul>
<%If parking = "yes" Then%>
<li>Private parking.</li>
<%End If%>
<%If swimmingPool = "yes" Then%>
<li>Swimming pool.</li>
<%End If%>
<%If bar = "yes" Then%>
<li>Bar with entertainment.</li>
<%End If%>
</ul>
<table>
<!-- this loop will continue until all the records in 'results' have been read -->
<% Do until results.EOF %>
<tr>
<!-- output the value in the named field -->
<td><a href="hotelDetails.asp?name=<%=results("name")%>"><%=results("name")%></a></td>
<td><img src="images/<%=results("rating") & "star.gif"%>" /></td>
<td><%=results("description")%></td>
<td><span class="red">£<%=results("price") & " per room per night"%></span></td>
<td><%=results("city")%></td>
</tr>
<%
' move to the next record in 'results'
results.MoveNext
loop%>
</table>
<p><a href="index.asp">home page</a></p>
</div>
</body>
</html>