Hi, I have 2 links which will insert information into a database. <?php $q = mysql_query("SELECT * FROM favourites WHERE username = '$username' AND offerid = '$oID'") or die(mysql_error()); $r = mysql_fetch_array($q); if (empty($r)) { echo '<a href="addfavourite.php?offerid=' . $list['id'] . '&username=' . $ofusername . '"><img src="template/images/afav.png" alt="Add Icon" border="0" /> Favourite</a>'; }else { echo '<a href="removefavourite.php?offerid=' . $list['id'] . '&username=' . $ofusername . '"><img src="template/images/rfav.png" alt="Add Icon" border="0" /> Favourite</a>'; } ?> PHP: Is there anyway I can get the link to update with addfavourites.php/removefavourite.php without refreshing the page?
Of course! Use AJAX, preferably jQuery. $.get('removefavourite.php?**aruguments**', function(data){ $("#result").html(data)});