FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Sessions and links
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Sessions and links [message #175753] Sun, 23 October 2011 09:58 Go to previous message
houghi is currently offline  houghi
Messages: 45
Registered: September 2011
Karma:
Member
I am not sure if what I want to do is a good solution.

I have currently something like:

if (isset($_GET['dir'])) {
$dir=($_GET['dir']) ;
} else {
$dir="$MAIN_DIR";
}
[...]
<a href="#?dir=/media/video/music">Music</a><br>
<a href="#?dir=/media/video/movies">Movies</a><br>

This works and there is also no security risk, as the site is only
accesible by me.

However in learning I would like to get rid of the parameter in the URL.
Now I can just edit the URL to e.g. dir=/home and be there. To avoid
this I was thinking of using something like:
$_SESSION['dir'] = '/media/video/music' ;

I am unable to find how I could put this in the link and all searches
point me in the direction of using $_GET which is much easier.

Is there a way to do this or should I not be botherd and keep using
$_GET ? I rather not use cookies as they are client side and I would
want to use the same information from different PCs.

As extra information, I also have other parameters next to ?dir on that
page. Some 20 in total.

houghi
--
This is written under the inluence of the following:
> Artist : Theatre Of Tragedy
> Song : Ashes and dreams
> Album : Storm
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: PHP Extension Namespaces
Next Topic: Giveaway: CodeLobster PHP IDE Professional edition
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Wed Nov 27 03:14:24 GMT 2024

Total time taken to generate the page: 0.04010 seconds