To open profile page,the link is localhost/prof.php?id=123.Now on opening this page,when I click on About(a text on profile page), I want the link to be localhost/prof.php?id=123/about to open the about page.How should I do that?
This cannot be achieved directly through PHP, and certainly not with HTML. It is usually achieved through configuration of the webserver, and since Apache is the most common webserver for PHP, you are probably looking for mod_rewrite.
I suggest you look for a guide on URL rewriting with mod_rewrite.
I also suggest that you go with something like localhost/profile/123/about
to improve readability if you are going to rewrite the URL anyway, no need to keep the .php?id=
in there.
You can't. You would need to create an "about" page and link to it by using localhost/about.php?id=123 No way around it.
First of all query strings i.e. ?id=123 appears at the end of each url and secondly you can just append the url from javascript or php then your url would be like localhost/about.php?id=123