php - Change link target when clicked -
i'm looping through database in while loop, displaying data this:
while($data = mysqli_fetch_array($mysql)) { <a href='" . $data['link'] . "'; }
what link target change when link clicked to
<a href='/links.php?id=" . $data['id'] . "';
so if copy link location http://google.com
if click link on site links.php?id=1
hope has idea :)
if said (there's nothing malicious)
$('a').on('click', function(){ var url = $(this).attr('href'); $(this).attr('href','/links.php?id='+ url); });
Comments
Post a Comment