Wayne's code worked, thanks for that. Now I'm running into an issue where a URL parameter is passed in through a PHP loop. Once the link is clicked, the code loops through a bunch of user IDs and rather than echoing the row that was clicked, it continues to loop through all of the user IDs.
Before it echoed an ID that corresponded to the rest of the data in the cell.
<?php while ($row = mysql_fetch_assoc($result)) : ?>
<?php $id = $row['id'];
<script type="text/javascript">
jQuery(document).ready(function(){
$(".userDetailsLink").click(function() {
$.ajax({
url: "userdetail.php?id=<?php echo $id ?>",
success: function(msg){
$("#results").html(msg);
}
});
});
});
</script>
<td width="90px" class="resultsDisplay"><a class="userDetailsLink"> <?php echo $row['Username']; ?></a></td>