Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: R: Re: FOR....LOOP


Message #1 by "Giovanni Salucci" <g.salucci@n...> on Sat, 16 Feb 2002 15:06:34 +0100
assuming you are using a database (access or sqlserver) the schema may be:



THE DATABASE



table questions (you store questions)

id_question (int)

question (text or memo)



table user (you store here the registration of users)

iduser (int autonumber)

user (text) you store name and surname





table answers

idrecord (int autonumber)

iduser (int) related with user table

ans01 (text)

ans02 (text)

....

ans100 (text)







ASP files



you need only some files:

1) form registration, in which you ask for user data and pass data to

regisytration.asp

2) registration.asp which validate user data and insert them in database,

then redirect to questionpage

3) question form display 5 questions of database. to control which answer

display you might use a Session variable

or use querystring. Submitting the form redirect to insert.asp

4) insert.asp validate the answers, insert them in table answers, then

redirect to question.asp for next displaying

or to final page when all questions are displayed

5) final page: you need thanks user to answering lot of pages!!!



remember you need pass from a page to another the iduser to update the

record...



HTH



Giovanni





-----Messaggio originale-----

Da: Linday Bakharia [mailto:lindsay_bakharia@h...]

Inviato: sabato 16 febbraio 2002 13.50

A: ASP Databases

Oggetto: [asp_databases] Re: FOR....LOOP





Sorry my message wasn't clear enough.  My goal is to display 5 questions

on each page and have a NEXT button at the end of each page to allow the

user to go to the next page until all the questions are addressed.



> Hi,

>

> I am building a data driven Survey application.  It's a long survey (100

> questions) and I would like to display 5 questions on each page.  I was

> sucessfully written a page that could display all the questions and

values

> on the web.  I know  a For....Loop would do it but since I am new to

asp,

> it's like a pain in neck.

>

> I would appreciate if you can give me a line of code or a site where I

can

> learn how to do this.

>

>






$subst('Email.Unsub').




  Return to Index