Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing variables through links http://somepage.asp?[var]=something

Status
Not open for further replies.

sgore

Programmer
Jul 22, 2001
30
CA
I am new to ASP and I am not sure how to pass variable
to another asp file and then use that info to populate
the other asp file.

I have 2 files I am working with:
players.asp
player.asp (template for all players)

I query a database for all players
Number Name
1 joe blow
2 other guy

I would like to have the names linked to the player.asp
file and pass that players Number to the generic player.asp
and query the database for all of that players info.

Something like this:
Number Name
1 <a href='player.asp?[player_number]> joe blow </a>
2 <a href='player.asp?[player_number]> other guy </a>

I am not sure how to pass variables through links and then
be able to use that variable to do another query to populate
the generic (player.asp) file?

Any help would be most appreciated.

Thanks,
 
Here is a real quick example:
In players.asp:
Code:
<a href='player.asp?playerid=1> joe blow </a>
<a href='player.asp?playerid=2> other guy </a>

In player.asp:
Code:
<%
Dim playerid = Request(&quot;playerid&quot;)
' Get your request player from database and display
%>

Hope this helps. Write back if you need a more detailed example. Wushutwist
 
That worked!! Thanks for the help I really appreciate it.
I was trying to make this way to complicated... :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top