Link to part of another page (not working)

Discuss coding issues, and scripts related to PHP and MySQL.
User avatar
JanMolendijk
Posts: 152
Location: Holland Rotterdam

Link to part of another page (not working)

I`m searching for few hours now but can`t find a solution to link to a part off a page ??? I try to use this...

In one comment-page I have this code

Code: Select all

<div id='. $row["comment_id"].'>
#'. $row["comment_id"].'
</div>
In another page I wanna use this link that will aply to that part of the page with this url: "Single-Item.php?id=536&#73"

Code: Select all

<a href="//145.53.93.209/Jan-Molendijk/User-Group-Item.php?id=<?php echo $row['topic_id']; ?>#<?php echo $row['comment_id']; ?>" title="" class="postlink" target="_top">
<?php echo $row['comment']; ?>
</a>

Admin
In your post, in the address from <a> element, it is not "Single-Item.php" page, but: "User-Group-Item.php".
Anyway, check the source code in your browser, for both pages, and see if it is correct the link for the other part of page, and if in the other page there is an element with ID of "#hash" added in that <a>.

JanMolendijk
It is strange I tried alot things nothing working correctly.
Meight my Question is wrong, Because I try from a page a link to another page but the specifiek part off it

Similar Topics