Newbie needs help with a form posting question.

B

badmojoman

Hi all,

This is a follow-up to a post I had made earlier - I hope folks bear with me
as I get a handle on things.

I am creating a site that has a database of books. I want to allow people to
be able to review any book, so I created a template page that retrieves all
the appropriate data for each book (when somebody clicks to it from a
catalog page).

I want to create a way for people to leave their own reviews of the book,
but obviously don't want to manually create hundreds of book pages for this!

Someone suggessted that I use a form that posts to a database, which makes
sense to me. What I need help with (as newbie) is how to code the post
portion of the submit button. I want to be able to capture the review, the
username, and, of course, link it to the appropriate book. Since each book
has a unqiue ID in my database (bookID), how can I automatically post that
into the database when someone writes a review of the book? What is the
proper way to code that?

Example: I have an index page listing all my books (retrieved via DRW).
Someone clicks on a title and are taken to a detailed page with the URL:
www.testsite.com/reviews/bookID=111. The page retrieves all the pertinent
data for BookID 111 and fills the page template accordingly. (All this is
working fine for me). The visitor then wants to write a review of this book
and fills in the form. How can I automatically make sure that BookID 111 is
submitted to my database when the visitor hits "Submit"?

Thanks again to everyone for helping out - very much appreciated!
 
S

Stefan B Rusynko

You will need to learn how to hand code ASP to write to your DB w/ the correct link to your DB book records
Start at http://www.w3schools.com/asp/default.asp and http://www.w3schools.com/ado/default.asp

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| Hi all,
|
| This is a follow-up to a post I had made earlier - I hope folks bear with me
| as I get a handle on things.
|
| I am creating a site that has a database of books. I want to allow people to
| be able to review any book, so I created a template page that retrieves all
| the appropriate data for each book (when somebody clicks to it from a
| catalog page).
|
| I want to create a way for people to leave their own reviews of the book,
| but obviously don't want to manually create hundreds of book pages for this!
|
| Someone suggessted that I use a form that posts to a database, which makes
| sense to me. What I need help with (as newbie) is how to code the post
| portion of the submit button. I want to be able to capture the review, the
| username, and, of course, link it to the appropriate book. Since each book
| has a unqiue ID in my database (bookID), how can I automatically post that
| into the database when someone writes a review of the book? What is the
| proper way to code that?
|
| Example: I have an index page listing all my books (retrieved via DRW).
| Someone clicks on a title and are taken to a detailed page with the URL:
| www.testsite.com/reviews/bookID=111. The page retrieves all the pertinent
| data for BookID 111 and fills the page template accordingly. (All this is
| working fine for me). The visitor then wants to write a review of this book
| and fills in the form. How can I automatically make sure that BookID 111 is
| submitted to my database when the visitor hits "Submit"?
|
| Thanks again to everyone for helping out - very much appreciated!
|
|
 

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