Link to part of another page (not working)
Discuss coding issues, and scripts related to PHP and MySQL.
-
JanMolendijk
- Posts:282
- 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=536I"
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
Posts:805
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
Posts:282
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
- GET_id not working in UnLink (delete file)
PHP - MySQL
First post
I searching for an hour for a solution; unlink seems not to work with GET id
<?php
$id = (int) $_GET ;
echo $_GET ;
$file = fopen( '.$_GET...
Last post
Here is an answer `o god after 2 hours shame on me for this one`
<?php
$file_pointer = $_GET .'.txt';
if (!unlink($file_pointer)) {
echo (...
- XAMPP-server only local host working
General Forum
First post
Dear Coursesweb,
I have a problem after round 10 hours searching I come to you for suport.
Only the local host is working: //127.0.0.1
But I...
Last post
OK thanks MarPlo.... Wishing overseas nice weekend