I have a dynamic hyperlink Baseball. When the user select the hyperlink they are redirected to another page.
After that I want to display information on the page from my linkstbl.
The information I want to display is Baseball and some text I have entered in the database. I'm having a problem displaying the two fields for Baseball.
The two field names are linkdescription and text. How do I get my sql query to pull out the information depending which Hyperlink such as Baseball, Hockey is selected and then display it???
Here is my code that is incorrect so far. This code is on the redirected page.
Expand|Select|Wrap|Line Numbers
- <% Dim Conn, RS, query
- 'Create an ADODB connection
- Set conn = Server.CreateObject("ADODB.Connection")
- 'Open the database
- conn.Open "Driver={MySQL ODBC 3.51 Driver};Server=24.79.93.78;Database=communitycentre;UID=mona.ramsay;PWD=puke_9;"
- 'Execute the SQL and assign to our Recordset
- Set rs = Server.createobject("ADODB.recordset")
- query = "SELECT linkdescription, text from linkstbl"
- rs.Open query, conn
- If Not rs.EOF Then
- Do Until rs.EOF
- response.write ("Page.asp?display="("linkdescription")("text") & vbCrLf
- ' response.write "<br>" & vbCrLf
- rs.MoveNext
- Loop
- Else
- response.write "No records." & vbCrLf
- End If
- 'Close connections
- rs.Close
- Set rs = Nothing
- conn.Close
- Set conn = Nothing %>