Link to part of another page (not working)
Discuss coding issues, and scripts related to PHP and MySQL.
-
JanMolendijk
- Posts: 199
- 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
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
-
Delete part of query string from url without page reload
JavaScript - jQuery - Ajax
The delPartUrl() function from the following JavaScript code can be used to delete part of query string from page url in browser, without affecting...
-
Create links with records and mysql page data from link
PHP - MySQL
First post
Into this code i see 30 records.
Now i wanna add a link to eatch single record.
i can do this with: >'. $row .'
but how do i create a singel...
Last post
If there is a notice_id ; in that mysql table, you can store it in a variable, then apply echo to that variable.
while($row =...
-
jquery-select2 (not working)
Scripts from this website
First post
Dear admin I`m testing this script on my server
, but it does not work.
I simply did copy your code for a test on my XAMPP Version: 5.6.31...
Last post
Thank you for the support Admin,
i thought their was a problem with
the PHP-version or something else
It is working fine now (stupido me)
-
convert the url & hashtag into link
PHP - MySQL
First post
I'm sorry to interrupt, I've been trying to ask a question on stackoverflow for an hour but I can not figure it out because they've changed their...
Last post
Here is an example that gets the url address and #hashtag:
$url ='some_domai.net/dir/page#hashtag';
$ar_u =[];
if(preg_match('/( +)( {0,1} *)/i',...
-
Looking for a php Page Counter
PHP - MySQL
First post
What i miss for my users is an page-counter.
Now i hope you have someting for me.
Something like on eatch different id.
Last post
Hello,
I have this php script for page counter and monitoring website traffic: