#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2013
    Posts
    1
    Rep Power
    0

    Counter of click


    Hello
    i should like to do a counter of clicks (with mysql database and PHP )
    So
    i've a link <a href="mysite.com">My site</a>

    I should like the url apperars and for example when i click open the link in the _blank target and add a click in y data base

    Have you an idea what i can do
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2006
    Posts
    40
    Rep Power
    8
    you can do this easily with php and mysql or php with a text file. All you need to do is to create a page for your counter script like counter.php. inside your counter.php will be your database increment counter and after the increment counter will be your php location redirect code, which will redirect the user to the page it is clicking.

    Your link should be something like this <a href='mysite.com/counter.php?url=sales.php" target="_blank" >My site</a> . Here sales.php is the page the user want to go. So your counter.php will increment your database and redirect the user to sales.php

IMN logo majestic logo threadwatch logo seochat tools logo