Recording hyperlinks clicked?


I’ve been doing a html course and css,

I have now got a bit of a project to do. Involves turning a document into a set of html pages. The document is basically a code/guide which a user uses to accomplish a task of one type or another.

There are instructions in the document along the lines of :

if the project meets criteria a and b goto to page 10 table 2

Obviously these instructions will be the hyperlinks.

What I need is to record the links that a user follows when working through the code/guide and output the steps as a text file.

Any advice on which would be the best language to do this in in terms of ease of use, how easy and quick to learn etc.

I am comfortable coding xhtml and css but would need to learn something new(which is good) if something like php is suggested. Alternatively is there a short piece of code for doing something like this that I could jig around?

Thanks in advance for any help guys.