Home »
Imported messages »
comp.lang.php »
Sessions and links
Sessions and links [message #175753] |
Sun, 23 October 2011 09:58 |
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
|
|
|
Goto Forum:
Current Time: Sat Nov 23 08:51:54 GMT 2024
Total time taken to generate the page: 0.07785 seconds