You can use AJAX to call a php script that increments a click-count value in your database whenever the banner is clicked. Here's a quick example using jQuery:
Javascript
<script>
$(function(){
$('a.ad').click(function(){
$.post('increment-ad-clicks.php');
});
});
</script>
PHP
<?php
// increment-ad-clicks.php
// Assumes you have an object instance of mysqli available.
$mysqli->query("UPDATE `ads` SET `clicks`=`clicks`+1");
?>
HTML
<a href="#" class="ad"><img src="/path/to/image.jpg" alt=""></a>
You'll probably want to add some code to pass an ad ID in order to track a specific ad, but this should get you started.