Re: [Phplib-users] Setting a session variable when clicking on a link
Brought to you by:
nhruby,
richardarcher
From: Michael C. <mdc...@mi...> - 2002-08-21 17:28:59
|
On Wed, Aug 21, 2002 at 12:51:56PM -0400, Michael J. Huber wrote: > We want to provide users a list of options (as a list of links) and set > a session variable to denote the choice when a link is clicked on. > This is to avoid having to encode that data into the URL, we are trying > keep everything on the server we can. Any ideas on how to do this, or > suggestions of a better option? > > The page the user will be taken to will be dynamically created based on > the choice made, so we can't (don't want to) have a .php file for each > option (the options themselves are also dynamic and user configurable). No offense, but this question represents a very fundamental misunderstanding of web programming. If the link has no distinguishing characteristics, how can the server know what you clicked? By definition, it cannot. If you want to "hide" the query variables (and by "hide", I really mean "hide from morons") you can make a small form with some post variables and instead of links put submit buttons. Or links with a Javascript submit that'll only work if Javascript is enabled. It's a lot of effort for little, if any, gain. Ultimately, I think you're trying to solve a non-problem. Michael -- Michael Darrin Chaney mdc...@mi... http://www.michaelchaney.com/ |