Passing an identifier using hyperlink
Hello;
I am at a loss. I fogot how to be able to pass a simple peramiter using a hyper link back to it's self on the same page. I also need the code that it activates only to activate if the link is used. How do I do this using a hyper link? I know how to use forms like this.
This is how the link works if I use another page to activate the code:
applysetting.cfm
<cfif IsDefined("deactivate")>
<cfcookie name="#deactivate#" value="Off" expires="never"><!--- <cookie defined - stop music> --->
<cflocation url="index.cfm" addtoken="no">
<cfelseif IsDefined("engage")>
<cfcookie name="#engage#" value="temp" expires="NOW"><!--- <cookie removed music is on> --->
<cflocation url="index.cfm" addtoken="no">
</cfif>
index.cfm
<a href="apply-setting.cfm?engage=hitbox">Sound On</a>
or
<a href="apply-setting.cfm?deactivate=hitbox"><strong><u>Sound Off</u></strong></a>
I am trying to make it work on one page:
index.cfm
<head>
<cfif IsDefined("deactivate")>
<cfcookie name="#deactivate#" value="Off" expires="never"><!--- <cookie defined - stop music> --->
<cfelseif IsDefined("engage")>
<cfcookie name="#engage#" value="temp" expires="NOW"><!--- <cookie removed music is on> --->
</cfif>
</head>
<body>
<a href="index.cfm?engage=hitbox">Sound On</a>
or
<a href="index.cfm?deactivate=hitbox"><strong><u>Sound Off</u></strong></a>
</body>
as it sits right now, it doesn't work properly.How can I adjust this so I can just make it load the one page and not the applysetting.cfm to make it work?
Thank you
