Celetron,
You'd probably get more specific answers by posting your question in the Delphi forum. In traditional CGI applications, you can choose from a number of different techniques to accomplish this:
-- You create an HTML form with multiple Submit buttons with different values and then evaluate the submitted value to determine the action selected by the end-user.
-- You can use cookies, provide the user is using an appropriately enabled browser.
-- You have a HIDDEN field that gets set to different values, based on the current "state."
In general, there's usually an environmental test you can make to determine which action is appropriate. When you're devising this, however, keep security in mind, for there are several ways to defeat each commonly-suggested technique. A lot depends on the sensitivity of the application and the data you're collecting.
(One big tip, though, is to not accept the target email address from your HTML forms; otherwise, you may find spammers using your application to send out their, um..."stuff." It happens more often than many people realize.)
Now, I'm afraid I've not created a web application in Delphi, so I can't provide a specific example, however, it looks as if
demonstrates several techniques you might find useful.
(Note that this is a sample article from a really terrific Delphi magazine. It's a bit pricey for those of us in the U.S., but well worth the investment, imho, for it covers a variety of things...including stuff that usually doesn't get covered in the traditional Delphi information sources.)
If you don't mind reading examples written in other languages, you may also find
and
helpful. Don't worry if you're not familiar with Perl, just read the source and try to see how the structure of these examples work. That should give you some additional ideas on how to manage the process.
Hope this helps...
-- Lance