Hi can anyone please help me I am pretty much stuck.
I want to add coldfusion counter on page , simple or advanced i can type whatever I want, that is not an issue. I tried i think 7-10 different types(I made all of them) of Coldfusion counter and something is wrong, my cfm counter is messy. I am sure that any of this code should work. Problem is in google adsense. When I delete google adsense from that page any code i type work fine. Can anyone please help me with my problem.
this is code i ma using now(I tried a few different code for update(count) on this page and then i decided to try with cfhttp...):
<cfparam name="URL.idscripts" default="1" type="Any">
<cfset count = 1*1>
<cfhttp method="Post"
url="http://counter.cfm">
<cfhttpparam type="URL"
value="#URL.idscripts#"
name="ID">
<cfhttpparam type="URL"
value="#count#"
name="count">
</cfhttp>
page that counts:
<cfparam name="URL.ID" default="14" type="Any">
<cfparam name="URL.count" default="1" type="Any">
<cfset element = #URL.ID#>
<cfset rate = #URL.count#>
// get total votes and current rate
<cfquery datasource="" name="getTotalVotes">
SELECT total_votes, total_value, post_rate
FROM scripts
WHERE idscripts = #element#
</cfquery>
// calculate new rate
<cfset newRate = (#getTotalVotes.total_value# + #rate#)/(#getTotalVotes.total_votes# + 1)>
// update rate
<cfquery datasource="" name="updateRate">
UPDATE scripts
SET post_rate = #newRate#,
total_value= (#getTotalVotes.total_value#+#rate#),
total_votes= (#getTotalVotes.total_votes# + 1)
WHERE idscripts = #element#
</cfquery>
again notice: When I delete google commercial any code works fine