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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing values from one page to next

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
0
0
I have an html page with records on it. After each record, I would like to have a link which users can click on to allow them to see more details of that record. To do this I need to pass values through to the next page. I don't know how to do this. Can someone explain it simply to me in detail as I am quite a beginner please.

Thanks a lot!!

Emma
 
Page with records:
<tr><td>
<a href=&quot;detailpage.asp?color=<%=RS('color')%>&quot;>Red</a>
</td></tr>
<tr><td>
<a href=&quot;detailpage.asp?color==<%=RS('color')%>&quot;>Yellow</a>
</td></tr>
<tr><td>
<a href=&quot;detailpage.asp?color==<%=RS('color')%>&quot;>Blue</a>
</td></tr>

Detailpage.asp
temp=Request.QueryString(&quot;color&quot;)
strsql=&quot;select * from clothes where color='&quot; & temp & &quot;'&quot;
 
There are a number of ways to do this. Besides the method mentioned by jhembree (using a querystring), you can also use forms, cookies or session varibles.
 
The HTML pages will have to be converted into ASP pages (if you're working with ASP, which I assume that you are if you're in this forum. All it means is changing the file extension from .html to .asp.

From there, you would repeatedly pass in the values as hidden input variables in the form fields. Of course, if you have a lot of variables being passed in, coding this may be a pain in the neck, but it would achieve the effect that you want. [sig]<p> <br><a href=mailto:aberman@thebiz.net>aberman@thebiz.net</a><br><a href= > </a><br>Database web programmer and developer, fueled by peach snapple and mochas.[/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top