Discussion Locked

PHP (Capturing Current URL)

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Is there a way the currect URL of the page can be read without using a form with post.

I'am calling another PHP file via HREF link & want to know the URL of the calling page

I know $HTTP_REFERER works with the form

thanks
Rakesh

3 replies

by andy

echo $HTTP_REFERER;

Will display the referring page fine without using a form post.

Andy

by rakeshkanojia

Actually I tried a lot but did not work, So in frustration & took help of Techrepublic :-)

The fault was sorted our after rebooting my PC.. I know it is strange but :-)

Thanks anyway for taking time to reply

Take Care & Have fun

This discussion is closed to new replies.