passing parameter to a database

J

jeff

relative newbie with a problem: For one of my research projects I would like
to direct participants to an initial page where they enter an ID number and
then step them through about 4 subsequent pages that have short
questionnaires, which dump the results to a database.

As a subject completes each web form, I would like have them follow a link
to the next form while passing their ID number along as a variable to be
incuded along with their responses to the next form. I.E. I don't want the
subject to have to re-enter the ID at each page. I think I just need to pass
the ID parameter between pages but I don't know how to do this. Ideas? (IIS
5 webserver on Win 2000 and Frontpage)
 
T

Trym Bagger

One option is the employment of a Session variable. Include the following
code on you login page (after the credentials have been accepted)

<%
Session("username") = RS("Username")
%>

(This assumes the availability of ASP and that during the login procedure a
recordset called "RS" has been opened from a database which contains the
column "Username").

As long as a user has enabled cookies and does not close all his browser
windows, the Session("username") variable will be available on all the
he/she opens within your web site.

Cheers,

Trym Bagger
www.lacanela.com
 
J

jeff

Thanks! This is a little over my head, but I think I can work it out.
Basically, I'm trying to pass an ID number entered on one page to a frield in
a form on a subsequent page.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top