How to make a html page link to a page where the url is dynamic?

currently I’m building a social network and wanted to link all the pages to the homepage.html. the problem is that the url changes depending on the user’s username or who the profile page the user is trying to visit. The url changes something like this "profile.php?u=johnGreen". The line of code I have to link the page its the normal <a class="dropdown-item1 " role="presentation" href="profileposts?u=<?php echo $username; ?>">

The profileposts?u=<?php echo $username; ?> its wrong I know but I’m assuming that it is something like that?

I don’t know how to search for an answer in google since it is a pretty especific question.

Add Comment
0 Answer(s)

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.