Sorry it's taken me a long time to reply. OK, here's my understanding of how it would be done (remember I've not done ASP for years so it may be slightly incorrect)
First Page - Shows member names
Code:
<html>
<head>
<title>Members</title>
</head>
<body>
<%
' Create Connection and Recordset objects
Set Conn = Server.CreateObject("ADODB.Connection")
Set Rs = Server.CreateObject("ADODB.RecordSet")
' Open the connection to the ODBC source, in this case
' the Access database
Conn.Open "your_ODBC_source"
' Now, create the SQL statement
SQL = "SELECT id, name FROM tbl_member"
' Execute the SQL statement to get a recordset
Set Rs = Conn.Execute(SQL)
' While records remain in the record set
Do While NOT Rs.EOF
' Print out a link for the current member
Response.Write("<a href=""gallery.asp?id="& Rs.Fields("id").value &""">"& Rs.Fields("id").value &"</a>")
' Move to the next record
Rs.MoveNext
Loop
' Tidy Up
Rs.Close
Set Rs = Nothing
Conn.Close
Set Conn = Nothing
%>
</body>
</html>
Page 2 - Gallery
Code:
<html>
<head>
<title>Members</title>
</head>
<body>
<%
' Retrieve the user's ID. You'll want this to retrieve the users data
userID = Request.QueryString("id")
' Create Connection and Recordset objects
Set Conn = Server.CreateObject("ADODB.Connection")
Set Rs = Server.CreateObject("ADODB.RecordSet")
' Open the connection to the ODBC source, in this case
' the Access database
Conn.Open "your_ODBC_source"
' Now, create the SQL statement
SQL = "SELECT * FROM tbl_gallery WHERE memberID = "& userID
' Execute the SQL statement to get a recordset
Set Rs = Conn.Execute(SQL)
' While records remain in the record set
Do While NOT Rs.EOF
'
' Do whatever you want with the data here!
'
' Move to the next record
Rs.MoveNext
Loop
' Tidy Up
Rs.Close
Set Rs = Nothing
Conn.Close
Set Conn = Nothing
%>
</body>
</html>
This was all pieced together off another website so sorry if it's inconsistent etc.