View Full Version : Advanced Question...


CuJo
07-03-2003, 04:04 AM
is it possible to make a link like the following?

<a href="{current url}/something/here.html>blah</a>


thx

burningstars
07-03-2003, 04:51 AM
If you would be replacing the {current url } part i dont see why not but if you dont change that I dont think it will work

CuJo
07-03-2003, 05:07 AM
no... im asking for a code 2 replace the {current url}

Dude128
07-03-2003, 05:15 AM
you can use either the full URL or a relative path.

so you don't have to use http://www.[domain].com/folder/files/page.html or whatever. if you want to link to a page in a subdirectory of the current folder, just use <a href="foldername/page.html">Link</a>

CuJo
07-03-2003, 06:53 AM
not what im asking for...

i want the code to take the address out of the users address bar... and then ad something at the end...

this is what i want...

lets say the users at index?main=blah
i want the link to change into index?main=blah&something=else

so "something=else" can be linked from any page on index

so main=blah or main=pics or main=games should still be able to go &something=else

_______

if its www.com/index?main=blah and you click <a href="&something=else"> it will go to to www.com/&something=else instead of www.com/index?main=blah&something=else

i want it to go to www.com/index?main=blah&something=else without having to chose what the ?main=blah is.... so it can be any page...

hope you understand.. thx

Sup3r L0w Fat
07-04-2003, 05:48 AM
Yes, I know that the drop down menus are mainly meant for getting from one website to another, but I wanted to make one so it plays music w/o bein taken to a different page. You see, I plan on adding a special page on my website that has either a drop down menu or a list of songs to play and a player , so when you click the song title, it plays, and you can minimize the window while looking at my website. if at all possible, I would like to know how to do this.

Katie

Spirit892
07-04-2003, 08:32 AM
that should be posted as a new thread, not as a reply. But here (http://lissaexplains.com/forum/search.php?s=&action=showresults&searchid=82037&sortby=lastpost&sortorder=descending) are some answers to your question.

Hope that helps :)

Ökii
07-04-2003, 11:59 AM
$_SERVER['PHP_SELF'] would return the path and filename (maybe just filename - I always use request_uri myself - don't use querystrings though)

$_SERVER['QUERY_STRING'] would return the ummm, query string (the var=val pairs)

so

echo '<a href="' .$_SERVER['PHP_SELF']. '?main=new">link ? new</a>';

see
http://www.php.net/manual/en/reserved.variables.php#reserved.variables.server
for full list of predefined server variables