Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Bob Bedford
October 21, 2004, 3:40 am
rate this thread
I've about 20 variables already set, so this is OK. But now I've 50 links to
various articles on my page. Those links are created dynamically using a
mysql table, so I take the ArticleID.
I'd like to avoid passing the ID in the URL. It's there any way to pass it
it's the only way to create the link. Or maybe must I use a FORM for every
Re: Session and link
To be able to store a value in the SESSION array, it has to be passed
somehow from the browser to the server. Otherwise, you will not know what
link the user clicked. There are 2 ways to do this - with HTTP get and post
requests. So yes, you can store that variable in the session array, but it
has to be passed to the server do so.
Now, I don't know what your issue is:
1. you don't want to send that particular ID parameter; or
2. you don't want to send any parameters; or
3. you don't want to display any parameters in the browser location bar
1. Then send something else - title, some other temporary session-based
2. You can't not send anything because then you will not know what the user
3a. What you can do is send the ID to article-redirect.php that will set a
session variable and then redirect to details.php. details.php will read
that session variable and display the article without displaying the ID in
the browser location bar.
3b. You can also send the article ID in the URL itself
where 1234 is the ID, and then use Apache's mod_rewrite (or a similar tool
for other web servers) to translate to
So, the browser will see only the original URL, while the content will come
Anyway, I don't understand what you are trying to accomplish with this. You
have to remember that (except in 3b) it will be harder for your users to
bookmark your articles, send links to friends, etc.