PDA

View Full Version : Banners!!



pavmoxo
08-03-2006, 11:01 AM
I make a form for insert banners into a site in any place that I wan't but a don't know how to count the clicks when I click the banner (It have a link and I do a PHP function to update a field named clicks but I don't know how to call it). Can You help me??

Example code that I wan´t modify:


<?
$sql = "select * from banners where place_ID = 1 and principal != 1 and area_ID = 1 and active = 'y' order by rand()" ;
$queryl = query($sql) or die ("Query failed: " . mysql_error() . " Actual query: " . $sql);
$arrl = mysql_fetch_array($queryl);
?>

<? if($arrl["link_banner"]) {?><a href="<? echo $arrl["link_banner"]; ?>"><? } ?><img src="<? echo $arrl["imagem"]; ?>" width="468" height="60" border="0"><? if($arrl["link_banner"]) {?></a><? } ?>