Copy link to clipboard
Copied
Hello,
I am quite new to CF and programming in general. I have created a form that when submitted adds the form data as a new row in a spreadsheet and sends an email via cfmail. I am stuck on this next part, however.
What I want to do is have a link that allows me to delete a row that is specifically tied to that email. For example, if I filled out the form and the email is sent to the admin, the admin could click this link and it would remove my row of information from the spreadsheet.
I appreciate any guidence I can receive on this one.
Thank you!
Copy link to clipboard
Copied
The link in the email would need a key value within the link. Such as DeletePage.cfm?ID=43234
Then create a page on the CF Server called DeletePage.cfm
Check for instance of "ID" value. If no such value, reject the attempt.
If ID exists within the URL, ask the user to log in or some such thing to ensure that the deletion is coming from an authorized person.
If everything matches up, run a delete queery to delete the database record in question.