Count click on external link

My problem is simple, can i count the number of time an external link has been clicked in a mysql database? After reading through some examples on the web this morning, most suggest using javascript to achieve but is there any way to do it without having to use javascript or ajax?

I have a set of dynamic created external links. Each link has an ID attached and I want to have a count for that ID that increases when it’s clicked and updates in the table.

Sounds simple but seems to be more difficult in practise.

A direct link to an external site, no.
You’d have to have a link to a php page that will update the database, and then redirect to the external page.

ok thanks for the quick response