rich1234
03-08-2008, 03:03 PM
Hi, would anyone know how to write a cookie based if clause to this.
I need a cookie to remember a user and if they click a link more than once it is not recorded.
this is the code bit that adds the record, I need it to say if peson has followed that link before dont add 1 to the database.
' If it's EOF then it's the first hit of the day and we need
' to add a new record o/w we simply update the existing hit
' count of the record by adding one to it.
If rsLinkTracker.EOF Then
rsLinkTracker.AddNew
rsLinkTracker.Fields("link_id").Value = iRedirectId
rsLinkTracker.Fields("hit_date").Value = Date()
rsLinkTracker.Fields("hit_count").Value = 1
Else
rsLinkTracker.Fields("hit_count").Value = _
rsLinkTracker.Fields("hit_count").Value + 1
End If
Any pointers as to how to write it and a cookie would be a great help
thanks richard
I need a cookie to remember a user and if they click a link more than once it is not recorded.
this is the code bit that adds the record, I need it to say if peson has followed that link before dont add 1 to the database.
' If it's EOF then it's the first hit of the day and we need
' to add a new record o/w we simply update the existing hit
' count of the record by adding one to it.
If rsLinkTracker.EOF Then
rsLinkTracker.AddNew
rsLinkTracker.Fields("link_id").Value = iRedirectId
rsLinkTracker.Fields("hit_date").Value = Date()
rsLinkTracker.Fields("hit_count").Value = 1
Else
rsLinkTracker.Fields("hit_count").Value = _
rsLinkTracker.Fields("hit_count").Value + 1
End If
Any pointers as to how to write it and a cookie would be a great help
thanks richard