2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by Agarsia
0

first of all: the url isn't right, if you want to get like: $test = 1 =>1.php and $test = 2 => 2.php this works:

while($row = mysql_fetch_array($sql_query)
$test = $row['id'];
{
   echo "<a href='".$test.".php"'>".$test."</a>";
 
}

seconddly $test will not access the link, you have to set a id to your link, to do this click-function only with that unique link or use the element "a" to do this with all links:

a-Version:

$(document).ready(function(){
$("a")click(function(){
//code
});
});

ID Version:

$(document).ready(function(){
$("#link")click(function(){
//code
});
});

and then add id="click" to the a-Element

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.