how can I get the link to call this funtion??
PHP Code:
function countclick($advert_id)
{
include ('config.php');
mysql_query("UPDATE adverts SET clicks = clicks + 1 WHERE advert_id = '" . $advert_id . "'") or die(mysql_error());
}
PHP Code:
$ad="<a href=\"".$row['link']."\" target=\"_blank\" onclick=\"'.countclick($advert_id);.'\" onmouseout=\"window.status=' ';return true;\">".$row['image']."</a><br/>";