Forum Moderators: coopster

Message Too Old, No Replies

Passing current url.

         

nasir2004

7:14 am on Feb 10, 2004 (gmt 0)



i have a tell a friend script (pop up window), but i want to send the current location (url)to the script as a veriable. i tried php self and other functions but it didnt send the current veriables to the script (only /script name). any ideas?

Robert Thivierge

7:38 am on Feb 10, 2004 (gmt 0)

10+ Year Member



try

"http://" . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"] .

you may also need urlencode()

But, I think you should always use phpinfo() and see what variables are available on *your* server.

tomda

7:48 am on Feb 10, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This is what I have and it pass the var to the popup

javascript:openit('sendto.php?url=<? echo $_SERVER['PHP_SELF'];?>')

Tommy