I have been trying a lot of different ways to make this work, but haven't found the right way to tackle this yet.
I need to make a list of links, each containing a number of querystrings with data. I need this data going to "get.php" through AJAX. Apart from using the data in "get.php" I would like to be able to via PHP change the class of the specific link clicked - for an example from "noshow" to "inattendance" or a third option link "sick".
I am thinking of listing the links like this:
<a href="get.php?athlete=57&session=142" class="noshow">Athlete 1</a>
<a href="get.php?athlete=45&session=142" class="noshow">Athlete 2</a>
<a href="get.php?athlete=23&session=142" class="noshow">Athlete 3</a>
Or perhaps the data should be in the ID to better be recognized in the script?:
<a href="#" id="57&142" class="noshow">Athlete 1</a>
<a href="#" id="45&142" class="noshow">Athlete 2</a>
<a href="#" id="23&142" class="noshow">Athlete 3</a>
Is AJAX able to change a link based on its ID, or would each link need to be inside a DIV?
I would love to get some help regarding where to go from here!
Thanks in advance!