passing values extracted from a database

Results 1 to 2 of 2

Thread: passing values extracted from a database

  1. #1
    Kim Casserly Guest

    Default passing values extracted from a database

    Hi<BR><BR>I am trying to pass values to different pages (ASP and HTML pages). First the user logs in through a form on LoginPage.htm. On the home page (default.asp), which is linked to LoginPage.htm, I have a query to a SQL database to customize that page with specific data depending on the login ID. My query includes a form field parameter in the "where" statement that links back to the login field on LoginPage.htm. What I need to do is pass the value of the login ID to different pages on the site - none of those pages are linked to the LoginPage.htm, but all of them are linked to default.asp. These pages need to be dynamic in that the data displayed on these pages depends on the results of the query on the home page - which in turn depends on the login ID. So, how do I pass values, which are the results of database queries, to different pages on the site?<BR><BR>Thanks in advance for your help!

  2. #2
    Join Date
    Dec 1969

    Default RE: passing values extracted from a database

    For this scenario, I&#039d recommend using a Session variable to store the user&#039s ID. There are a number of ways to pass information from one ASP page to another, and Joao Vieira has outlined four ways to pass data in his article:<BR><BR>Four Ways to Pass Information From One ASP Page to Another<BR><BR><BR>You might also want to check out the article:<BR><BR>Simple Authentication<BR><BR><BR>It discusses how to have access to various pages restricted to "authenticated users." While it doesn&#039t sound like you&#039re trying to restrict access, but rather just tailor information to a user&#039s login, it should still help give you an understanding of logging in a user and keeping track of where that user is navigating.<BR><BR>Lastly, I&#039d also recommend you check out:<BR><BR>Creating a Customized HomePage<BR><BR><BR>That sounds like the crux of what you&#039re trying to do.<BR><BR>Good luck, and happy programming! :)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts