Page 1 of 1

hyperlink hits counting

Posted: Fri Mar 24, 2006 12:31 am
by geeshan
I am an IT student in Sri Lanka. As an assignment we have to implement a library in php.

So what I need to know is how I get the click event of a hyperlink when it is clicked.
I need it because I have to remove the articles which are not seen by anybody.

If you know please help me.

Geeshan

Posted: Fri Mar 24, 2006 12:33 am
by s.dot
redirect the link to an intermediate page which updates a database field in a database

link structure

Code: Select all

<a href="redirect.php?articleid=5">This Article</a>
then on redirect.php, update a timestamp in a database that corresponds with the article id, then redirect to the article. it will be seemless.

then you can run a script to remove articles with aren't viewed within x amount of time

Posted: Fri Mar 24, 2006 2:06 am
by feyd
geeshan mistakenly posted this to a new thread:
thanks Guru,
But I'm very much new to php.
I know that "redirect.php?articleid=5">" pass the article id to redirect.php.But how I get it to the
varialble in side the redirect.php file.

Geeshan