I want to change the href of a link after it is clicked 10 times. Every time someone clicks the link a number in a database increments by 1.

then i see if the row is less than 10 

```
include'connect.php';

$result = mysqli_query($con,"SELECT id, link_name, click  FROM clicks WHERE click< 15");

while($row = mysqli_fetch_array($result))
{
$clicks = $row['click'];
echo $clicks;
}

```

I just put the echo to see if it was working i need to replace that echo with jquery to change the href of a link to the new one. Is that smart or bad coding trying to integrate two languages together? since it cant be done through jquery or php individually.