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!
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!