Log in

View Full Version : Current Page URL



Moglizorz
01-09-2008, 11:00 AM
I wish to have a link on an "invisible page", so I can't manually type the link. Does anyone know the php code to insert the current URL of the page it is on?

So I can do e.g:

<a href="PHP Code thing here">Current Page</a>


And it will link to the page you are already on, but NOT a refresh link?
My dear friend Google couldn't help me :(

Moglizorz
01-09-2008, 11:06 AM
Found it, wow, I must be blind. Ignore this post please ^^


<?php echo $_SERVER["PHP_SELF"] ?>

Twey
01-09-2008, 11:07 AM
<a href="<?php echo $_REQUEST['HTTP_REQUEST_URI']; ?>">Current Page</a>should work for you.