Forum Moderators: coopster

Message Too Old, No Replies

Tracking the clicked anchor text

How can i fetch a clicked anchor text

         

kunwarbs

6:19 am on Dec 1, 2004 (gmt 0)

10+ Year Member



I want to fetch the anchor text clicked by a user. Can it done with php.

Deailed description: I want to create a dictionary kind of thing. Every word in the paragraph will have a link and a value which will be the cliked word will be passed to the next page that will fetch the meaning of that word from the database.

Please help

mincklerstraat

7:12 am on Dec 1, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



PHP (nothing really - an issue of browser security and privacy) can tell you what the anchor text was - unless you let php give some extra information in your links that tells what that anchor text was.

<a href="mypage.php?txt=aardvark">aardvark</a>

On mypage.php, $_GET['txt'] will equal 'aardvark'.

kunwarbs

8:20 am on Dec 1, 2004 (gmt 0)

10+ Year Member



>> <a href="mypage.php?txt=aardvark">aardvark</a>
>> On mypage.php, $_GET['txt'] will equal 'aardvark'.

But that is again a big cumbersome thing to add such an index value for each of the word in the paragraph especiallly when i have 2-3 page long text.

any other solution?