I have the following codes and it seems to work well but when exiting the site and re-entering it resets the values to 0 again.
I am not sure how to proceed with this, been considering cookies but what if the user clears there cookies, I then looked at PHP but not understanding that to well at this stage.
This was posted on the Javascript forum and they refered me here.
Javascript
Code:
// Function to count clicks on links
var clicks1 = 0;
var clicks2 = 0;
var clicks3 = 0;
var clicks4 = 0;
function link1(){
document.getElementById('clicked1').value = ++clicks1;
}
function link2(){
document.getElementById('clicked2').value = ++clicks2;
}
function link3(){
document.getElementById('clicked3').value = ++clicks3;
}
function link4(){
document.getElementById('clicked4').value = ++clicks4;
}
HTML Code:
Code:
<tr valign="middle" align="center"><td colspan="1"><a target="_blank" href="http://mistiquestormelectronics.webs.com/" onclick="link1()"><img src="site_graphics/reinet.jpg" alt="Mistique Storm" width="120" height="90" /></a></td>
<td colspan="2" align="left"><p>For all your Electronic equipment needs.</p></td>
<td colspan="1" width="8%"><input id="clicked1" style="color: #000000; font-weight:bold; border-style: none; font-family: arial; background-color: #00FF00; text-align: center;" readonly="readonly" size="10" onfocus="this.blur();" value="0" ></td></tr>
Javascript forum advised me to use serverside cookie PHP or ASP dont know either but done some PHP(minimal), Please help.
The link on what I want to do is at:
www.sayorkies.co.za/friends.html
I want it to show all users count that clicked the link and no unique users, also preferably with no mysql.