Hello derek,

Tuesday, February 06, 2001, 7:58:25 PM, you wrote:


df> Hi Max,

df> Thanks for the reply.  Unfortunately, the solution you suggest means 
df> that I would have to do a set_var on all hyperlinks (i.e., define all 
df> hyperlinks everywhere on the site), which is a huge amount of 
df> maintenance.  What I thought about yesterday was creating some sort 
df> of token (e.g., {@@@@@}) that could be tacked onto the end of 
df> hyperlinks that I want to add session info to.

Of course, you can have static hyperlinks in your template, ending
with, say, {sessinfo},
e.g. <a href='somedir/somescript.php{sessinfo}'>blabla</a>
and then in the script:
$tpl->set_var('sessinfo', ((SID) ? '?'.SID : ''))

df> Maybe there's a 
df> better way...  I don't know!  :(

Another way is to turn output buffering on before processing the
template, and after $tpl->pparse(...) save the buffer, and apply a
regexp to it, which would append session info to every link on the
page.

And the last, should-be the best way. Compile PHP with
--enable-trans-sid and forget about manual appending the session info
to the links and forms.


-- 
Best regards,
Max A. Derkachev mailto:[EMAIL PROTECTED]
Symbol-Plus Publishing Ltd.
phone: +7 (812) 324-53-53
http://www.Books.Ru -- All Books of Russia
 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to