I was looking at the cfhttp tag and it is possible to use it to pass variables via clicked link?
<cfhttp method="Post" url="myurl">
I am trying to pass variables on a link click (for example, user IDs), but it seems a bit insecure to send via GET…
My original answer completely missed the mark, but I can’t delete an accepted answer, so for the purposes of clarity, I’m changing this answer to agree with Billy’s comment above.
CFHTTP is for making a server-side request to another website (as if you were visiting the site yourself), processing the results of that request, and storing them in a variable, which can then be used by you to perform additional tasks against (say, the parsing of a website’s homepage for specific values).
What you are asking for appears to be a completely unrelated piece of functionality, in which:
The simplest way to accomplish this is to use a hidden form, and have the hyperlink submit then form. This matches Billy’s suggestion in the comments for your question:
Here, you have an HTML form with two hidden fields, username and id, which do not display on the page as they are hidden (but take note, can still be viewed if the user views the source of your page). Next, “the link to click” visibly appears as a hyperlink to the user. When clicked, JavaScript is used to simulate the firing of the form submission; it essentially behaves as if the form had a submit button and the user clicked that submit button. What that means for this example’s form is that both the username and id values are then HTTP POSTed to your ‘pageToSendVarsTo.cfm’ page, where they are available in the FORM scope to continue processing.