How to create a session value or cookie from a recordset loop
I have hit a brick wall with trying to bind the correct id value to a URL link that is in an automated email that is sent to numerous individuals. the email recipients are built form a recordset loop.
The process as follows..
- A Primary User sets up an account using a web form ( see file - add-rtm-account.php )
- Each account has a primary key ( acc_id )
- When they have verified their account they can login, which creates a session that is built on their primary key ( acc_id )
- Once they are logged in they are directed to a page ( see file - consent-consolidation.php ) where their objective is to build a Group of individuals.
- For each entry the Primary User will enter NAME, EMAIL and FLAT NUMBER in the form and once submitted the entries appear an a REPEAT REGION table on the same page. ( see screenshot01 )
- The table that holds the Group values has a column called acc_group which has the same relational value to the acc_id of the user. ( see screenshot02 and screenshot03 ) each Group entry has its own primary key as entry_id
- When the Group is complete it is submitted using a small form containing just a submit button ( see screenshot01 )which triggers two behaviours..
- a) a update single record behaviour which changes a value in a column named ‘status’ in the account table so admin can determine that the Group has been submitted.
- b) a Create Email server behaviour is triggered with the recipients emails built from a recordset loop. ( see screenshot04 ) which are the emails form each group entry submitted previously by the Primary User.
- The email body ( see file - blank_3.php ) contains a link which directs the recipient to another form ( see file - consent-form.php ) and I need to bind the entry_id of the recipient to the url so I can use this id in the consent form page as a relational value.
HERE IS MY PROBLEM.
I can not see how I can create the entry_id, possibly in a session or cookie, to bind it to the URL because recipients are built from the recordset loop… if that makes sense. so I can’t see how I can take the entry_id from each looping record.
How can I bind the entry_id so each recipient has its primary key binding in the URL in the email file?
I hope you can make sense of all this!!
Thanks in advance.