</TABLE>
<% Rs.Close
Set Rs = Nothing %>
<p> </p>
</body>
</html>
<%
conn.close
set conn = nothing
%>
Page 2 The Profile Page that shows the complete info on the person that was chosen!
<%@ Language = "VBScript"%>
<%
response.buffer = True
On Error Resume Next
'Declare all local variables
dim conn
dim rs
dim strID
Dim strZoneName
Dim StrEmailAddress
Dim StrRowSpan
dim StrImageInfo
dim strconn
strconn = "DRIVER=Microsoft Access Driver (*.mdb);DBQ=" & Server.MapPath("hyperlinkdemo.mdb")
'Pick values up from the url
strEmpID = request("EmpID")
strEmailAddress = request("EmailAddress")
'Set connection String and recordset objects to bring back member info from db
set conn = server.createobject("adodb.connection")
conn.open strconn
'Standard Error coding
If err.number <> 0 Then
Response.Redirect "Error.asp?number=" & err.Number & "&desc=" & Server.URLEncode(err.description)
End If
set rs = server.createobject("adodb.recordset")
strSql = "select tblMemberInfo.EmpID tblMemberInfo.EmailAddress tblMemberInfo.Link_to_Homepage" & _
" FROM tblMemberInfo" & _
" WHERE (((tblMemberInfo.EmpID)='" & strEmpID & "')" & " AND ((tblMemberInfo.EmailAddress)='" & strEmailAddress & "'))"
rs.open strsql conn
'Standard Error Coding
If err.number <> 0 Then
Response.Redirect "Error.asp?number=" & err.Number & "&desc=" & Server.URLEncode(err.description)
End If
'Sets local variables to help write out the table
strRowSpan = rs.fields.count + 1
strImageInfo = rs("path_to_image")
%>
<html>
<head>
<title>Profile Page</title>
</head>
<body>
<h1>The Profile you chose is for:<% = strEmpID %>
<form>
<TABLE BORDER="1">
<tr><td BGCOLOR="FFFFFF" rowspan="<% = StrRowSpan %>">
<%
'Determines if an image is in the database or not if so it writes out the path
If strImageInfo <> "" Then
response.write "<img src='" & strImageInfo & "'></td>"
Else
response.write "<h4>No Picture Provided</h4></td>"
End If
%>
</tr>