PDA

View Full Version : [RESOLVED] show current page's link


sp@rky13
08-07-2009, 08:14 PM
What I want is to use some html or javascript or something to show the user of my site the exact page they are viewing. Then i would set it up so they could either bookmark it or copy the link. So a normal bookmarking script is not what I want. I need to be able to display the link the user is viewing on the page they are viewing. How can this be done?

Mandarin
08-07-2009, 08:28 PM
You should be able to do this with JavaScript but it's always better to do it on the server side when possible. Assuming you have access to PHP, you can use this technique (http://www.webcheatsheet.com/PHP/get_current_page_url.php) to get the current page's URL.

sp@rky13
08-07-2009, 09:54 PM
^ Worked perfectly. tyvm