[eluser]davidbehler[/eluser]
- Add a column named "ads_click_count" or something like that to your table
- The link on the Ad should be to one of your sites, e.g. ads/view/ad_id
- On that site you simply update the ads table for ad_id and increase the counter field by one, e.g.
Code:
$query = "Update ads set ads_click_count = ads_click_count + 1 where ads_id = ".$this->db->escape($ads_id).";";
// You could use active records aswell
- After updating the counter you redirect to the real destination of the ad, e.g.
Code:
redirect('http://www.google.de');
That should be it. There are more ways to do this, e.g. use Javascript, but that's what I came up with in a hurry