I want to be able to create links to pages that will display information depending on the link value. I know you can do this using $_GET but I want the link to look something like, example.com/username and not example.com/profile.php?username=username. What is the best way to do this using PHP? Thanks, Cicisoft
This link should help you: http://stackoverflow.com/questions/...htaccess-for-a-user-profile/15436475#15436475
if youre talking about the way they show in the address bar, they're right you have to convert it by htacess but if you want them displayed on a page for better looking links perse' then you can display them for display purpose as $website = "example.com/"; $username = $_POST['username']; $display_URL = $website . $username; echo $display_URL but then for them to actually work you could put a graphic button like a small arrow --> after the displayed name (since the displayed name URL which wouldn't be a hyperlink) the arrow graphic itself would have the hyperlink as in <a href="<?php echo 'example.com/profile.php?' . $username; ?>"> <image src="arrow.jpg" border="0"> then you would have a webpage display of example.com/username [arrow graphic] so the link still works.
Why in the WORLD would you do something as stupid as that? Why having a image-arrow be the link? Why not just have the actual "pretty" text be the visible indication of a link, and just, instead of that image-elemtn in the link, have the $display_URL echoed out in the link? Why make stuff more difficult than it has to be, besides, having an image be the only url is bad form and bad useability.