legohead6 Posted June 22, 2007 Share Posted June 22, 2007 i need to get the address path of my page as a variable, it changes depending on the id and settings of user so i cant make it a fixed one. how do i do this. Quote Link to comment Share on other sites More sharing options...
teng84 Posted June 22, 2007 Share Posted June 22, 2007 use $_SERVER['DOCUMENT_ROOT']; you can have the location of your site there^^ but if you mean get the value of somethng in the url use the $_GET['ure desired variable here'] sample: http://www.ASTIG.com/page.php?id=ASTIG then use $_GET['id']; so you will have the ASTIG as the value Quote Link to comment Share on other sites More sharing options...
legohead6 Posted June 22, 2007 Author Share Posted June 22, 2007 no thats what i wanted, thanks, i need to copy all the get varibles set over, but there could be different ones set depending on settings and stuff, so i though just explode at the question mark and then add in. Quote Link to comment Share on other sites More sharing options...
teng84 Posted June 22, 2007 Share Posted June 22, 2007 sorry but blurred question ??? any way you can have this id=ASTIG&id2=ASTIG&id3=ASTIG "it changes depending on the id and settings of user so i cant make it a fixed one" u can also use session on that^^^ Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted June 22, 2007 Share Posted June 22, 2007 either the $_GET super global or the $_SERVER['REQUEST_URI'] or $_SERVER['QUERY_STRING'] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.