Mo,
"(we haven't found, in our initial research, a way to do this)"
You could format your variables before they're needed in the link
something like:
    if(isset($x)) $x_link="&x=$x";
    if(isset($y)) $y_link="&y=$y";
    etc.
then your link would look like the following
<a href=someplace.com?slug=1$x_link$y_link....>someplace.com</a>
"slug=1" is used so that none of the preformatted variables need to start
with a ? instead of an &.  if one, or several of the preformatted variables
are empty, the line just slides to the left and fills any vacancies.  If all
your pages start with the same if(isset()) table, then the variables will be
passed around as long as the user stays at your site.  No cookies or
sessions required.
Hope this helps,
Hugh
----- Original Message -----
From: "Maureen Roihl" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, March 14, 2003 1:31 PM
Subject: [PHP] inserting parameters into URLs dynamically


> We are looking for a way to set several key/value pairs (which will differ
> across  users)  such  that they will persist during the user's session
and
> be  logged  in  the  weblogs for every request that user makes. Some
> potential ways of doing this that occurred to us:
>
> -  implement functionality to programmatically append these parameters to
> the  querystring  of all urls displayed across our site (far too
cumbersome,
> we don't consider this a viable option)
>
> -  find  a  way  for PHP to automatically tack the parameters onto the
ends
> of url querystrings, the same way it can do with PHPSESSIONID (we haven't
> found, in our initial research, a way to do this)
>
> Our primary goal is to get these parameters logged in the weblogs, without
> having to programmatically/physically modify every link on our site. For
> example, if we wanted to track parameters called x and y, the link on the
> page would just point to:
>
> /index.php
>
> but the weblog would show something like the following hit:
>
> /index.php?x=foo&y=bar
>
> The parameter values would need to get set once at the beginning of a
user's
> session, and then would not change over the course of that session (but
> they'd need to get tracked with every request they made). We're planning
to
> implement persistent sessions across our servers as well.
>
> ====================================
> Maureen Roihl
> Senior Web Developer
> Smarter Living
> [EMAIL PROTECTED]
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to