So i am trying to use ajax to update a value in my sql database by grabbing the link that was clicked and finding that link in the database. I'm not sure why it isn't working :\
$('.visit').click( function() {
var thisLink = $(this).attr('href');
$.post("visit.php", { link: thisLink});
});
<?php
$link = $_POST['link'];
mysql_query("UPDATE items SET visited = 1 WHERE link = $link");
include("print.php");
?>