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

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -