[PHP] Re: setting a session with a text link?

2006-08-21 Thread Ivo F.A.C. Fokkema
On Mon, 21 Aug 2006 13:08:04 +0100, Ross wrote: I want to set a session with a text link, am having problems with the syntax. The link swiches the session to on or off. a href= class=link_textswtich off/a href= class=link_textswtich on/a I want to do this but the syntax is incorrect.

[PHP] Re: setting a session with a text link?

2006-08-21 Thread Ross
That is it but can I not set the session variable directly from the link? Something like.. print('A href=' . $_SERVER['PHP_SELF'] . '?$_SESSION['switch=on']Switch on/ABR Ivo F.A.C. Fokkema [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Mon, 21 Aug 2006 13:08:04 +0100, Ross

Re: [PHP] Re: setting a session with a text link?

2006-08-21 Thread Richard Lynch
a href=?php echo $_SERVER['PHP_SELF']??_SESSION[switch]=0off/a This *might* work, if you have session.auto_start set to ON, so that the session is started before PHP processes the URL, and if you have register_globals set to ON But I doubt it, as that would be horrible security, because you