Reputation: 27
I have the code
echo '<span class="imperial-username">';
echo'<a target="_blank" href="profile/'.$row['name'].'">'.$row['name'];'</a>';
echo'</span>';
which functions fine when i press the name it takes me to the profile. But if I click the image also above the name it will go to the person who is above on the list, as I have a list of links. And only goes to there profile if you click the name specifically.
Also all other links on the page seem to be not functioning properly and going to random profiles when pressed, the links are carrying over down the page or something is what I assume, maybe code not closed properly, but I see nothing that should be causing this.
Upvotes: 1
Views: 184
Reputation: 1570
echo '<span class="imperial-username">';
echo '<a target="_blank" href="profile/'.$row['name'].'">'.$row['name'].'</a>';
echo '</span>';
Upvotes: 1
Reputation: 695
please try this
echo '<span class="imperial-username">';
echo'<a target="_blank" href="profile/'.$row["name"]>'.$row["name"].'</a>';
echo'</span>';
Upvotes: 1
Reputation: 19780
You have a semicolon ;
instead of a dot .
in .$row['name'];'</a>';
.
It is not a syntax error, because the instruction '</a>';
is valid but has just no effect.
Upvotes: 1