I have 3 tables (Directory, Interaction, Referrals). The Directory table is a list of resources and providers. Interaction is details about a specific interaction my team has with a caller. Referrals is a simple table that contains 3 fields (Directory_ID, Interaction_ID, Refer_Time) and is intended to track all of the times a specific entry in the Directory is referred to one of the callers from an interaction. In a single interaction we can refer anywhere from 0 to 10 resources and those resources can be referred to any number of different Interactions.
I would like to build a search form of the Directory where the details page of the results would have a button that when it is pressed, it creates a new record in the Referrals table that contains the Directory_ID of the resource being viewed, the Interaction_ID that has been passed to the search datapage through an external parameter, and the timestamp of when the button was clicked.
I'm stuck....Does anyone here have an idea how to accomplish this?