I want to provide a page which has some php doing database manipulations - but the user needs to supply a piece of data to set it off. That's pretty simple with an html/php form which calls itself - but how do you do it in Drupal?

I presume the answer lies in a Javascript action and the simplest thing would seem to be to add a variable into the drupal database that the page would pick up on a refresh of the page.

Can anyone give me the clues of how to do it? I'm still using Drupal 5 for various reasons.

Chris