[PHP] switch it button

2006-08-23 Thread Ross
At the moment I have this, but I want to change it to one switch button a href=?php echo $_SERVER['PHP_SELF'];??session_switch=1switch it/a. I have tried but keep getting wrapped up in nested if-else statements. Does anyone know how to make an efficient one button on-off switch

RE: [PHP] switch it button

2006-08-23 Thread Jay Blanchard
[snip] At the moment I have this, but I want to change it to one switch button a href=?php echo $_SERVER['PHP_SELF'];??session_switch=1switch it/a. I have tried but keep getting wrapped up in nested if-else statements. Does anyone know how to make an efficient one button on-off switch. [/snip

RE: [PHP] switch it button

2006-08-23 Thread Ford, Mike
On 23 August 2006 12:45, Ross wrote: At the moment I have this, but I want to change it to one switch button a href=?php echo $_SERVER['PHP_SELF'];??session_switch=1switch it/a. I have tried but keep getting wrapped up in nested if-else statements. Does anyone know how to make

Re: [PHP] switch it button

2006-08-23 Thread tedd
At 12:44 PM +0100 8/23/06, Ross wrote: At the moment I have this, but I want to change it to one switch button I think I know what you mean -- a single switch button. Please review this kiddie-script: http://xn--ovg.com/a/toggle.php hth's tedd -- --- http://sperling.com

Re: [PHP] switch it button

2006-08-23 Thread Arpad Ray
Ford, Mike wrote: How about something like: a href=?php echo $_SERVER['PHP_SELF'] ??session_switch=?php $_GET['session_switch']?0:1 ?switch/a Beware that PHP_SELF is injectable like several other $_SERVER variables, so you must at least encode it to prevent XSS attacks. Eg.