Hello!
Does anyone know some function to count the clicks on some links?
I think I will use a MySQL database to store those number, but I don't know how to use that function in side a href.

Something like <a href="www.phpbuilder.com" onclick="functon()">
seems not to work.

I am waiting for replies.

Chamade😕

    Hi,

    you could write a redirector script that implements the counter function. Something like

    
    <a href="redirect.php?url=<?PHP echo urlencode($url); ?>">click here</a>
    
    redirect.php:
    
    <?PHP
    $theUrl = urldecode($_GET['url']);
    
    // some code to insert data into database
    
    header("Location: $theUrl");
    exit;
    ?>
    
    

    Thomas

      Write a Reply...