[phplib-dev] GET variable problems From: Jeff Schmidt (jschmid <email protected>)
Date: 04/27/00

I have a few questions and a couple comments.

First question: I'm using phplib-7.2b. I've made some modifications and
changes to it, so the following problem might be one I brought on
myself, in which case I don't expect you to be able to help me, but I
need to make sure first. The problem I'm getting is that when I disable
cookies in my browser, thereby forcing get mode operation of phplib (I
wanted to test it to make sure it worked both ways), I end up with two
copies of the session ID in the URL instead of one. The modifications
I've made to the session class wouldn't cause this, I think, but am not
sure. If anyone else can confirm, in the positive or negative, whether
they can replicate this error with a stock 7.2b install I'd be grateful.

Second question, and comments: Why does self_url() automatically
propagate all the "GET" variables? This has caused me quite a bit of
grief. At first I took the approach of trying to create a function that
would rebuild $QUERY_STRING (which self_url() concatenates onto the url)
in the process removing variables that I didn't want to propagate. Then
it dawned on me, I don't want to propagate _any_ get variables (well,
except for session ID of course). Any variables which I send to my
script are only good for that page load (and I should think this would
be true for most (though of course not all) scripts). I use get
variables to tell my script what User's record I want to view, what
administrative page to load (the page to create new accts, or the page
to delete accounts, etc). In other words, I embed links in my web-pages
of the form:
<a href="<?php $sess->pself_url(); $sess->padd_query(array("again" =>
"yes"));?>">logout</a>.
<a href="<?php $sess->pself_url(); $sess->padd_query(array("action" =>
"AddUser");?>">Add a User</a>
. . . etc . . .

     Anyhow, perhaps someone could share with me the reasoning behind
the decision to propagate get variables, please? I would be happy to
submit the necessary patch to change this behavior if you agree with
me. If people wanted to propagate get variables, they can always do it
manually with $sess->(p)add_query(). I just think that the default
should serve the majority of users, and it may be I'm wrong, but I think
that the majority of users probably don't want the variables propagated
from page to page and are trying to figure out how to e.g. get rid of
"again=yes" from the login forms, after they've called their page with
that variable to force a login.

     Or, maybe I've just missed something. If I've missed something,
please give me a clue ;-) If not, I'd like to get some response to
this. Thanks, Jeff Schmidt

--
"Message sent by jschmid <email protected>"

--------------------------------------------------------------------- To unsubscribe, e-mail: phplib-dev-unsubscribe <email protected> For additional commands, e-mail: phplib-dev-help <email protected>