i think it will be better to set the text of anchor in the url.
Like this:
<a href="/some-value?tab=Tab 1">Tab 1</a>
<a href="/some-value?tab=Tab 2">Tab 2</a>
And then if you want to know which tab clicked just get the tab value
$_REQUEST['tab']