Gossamer Forum
Home : Products : DBMan : Customization :

how to pass the URL of the add record form

Quote Reply
how to pass the URL of the add record form
I would like to customize DBMan for a webzine to include a small form at the bottom of each page so that a reader could submit their ratings and comments on the article.

I'm familiar with DBMan but do not know Perl, so here's my problem. I want to know which article readers are commenting on, so I need the form to pass the path or URL of the page to the db file.

I tried including a hidden input with name="path" and value="$ENV{'FILENAME'}" in the submit form and added "path" to the %db_def of the config file, but it doesn't work and I don't know enough about Perl to figure out what to try next.

Is there an easy way to do this, or a mod out there somewhere to write the add record form's path to the database?
Quote Reply
Re: [stevenlael] how to pass the URL of the add record form In reply to
Do you have a separate form on each page? If so then add a hidden field called "page" and give it a value of whatever you want to indicate each article. You'd also have to add the field to the database.

Perhaps you could use JavaScript to get the name of the file "article1.htm" or something?

If using the Environment Variable try adding "HTTP_" and see what happens $ENV{'HTTP_PATH'} or something.
Quote Reply
Re: [Watts] how to pass the URL of the add record form In reply to
Check out this post and see if it helps you any...

http://www.gossamer-threads.com/...;;page=unread#unread