New to php :)
Working on a blog project, I want to navigate (send) the users to another page with specific (complete) post and its comments by clicking "Comments" link on index page.
I wish to send the user directly to the comments div. but I also have to provide post ID with the link after question mark"?". I want to know where to include #comments div (html section) in the url.
Thank you in advance.
First, assign the id
to the element you want browser (user) scroll to.
Ex.
<div id="mycomment">
Then, generate the url that append with #
and id
you choose.
Ex.
http://example.com/post/1/#mycomment