Re: [PHP] globalize all variables not coming from a certain form...

2001-05-19 Thread Chris Lee
I hate using global variables this way in functions, but it can be done. $val) global $pos; // reset of your code. } ?> there are good reasons for global variables, but use them wisely, globals are offten missused and create illegible code. most variables should be p

[PHP] globalize all variables not coming from a certain form...

2001-05-19 Thread Siim Einfeldt aka Itpunk
Hi everybody, Is it possible (and if it is, how) to globalize all the variables, that come from some form, automatically? For example: function do_something(){ global $form; if($form != "func"){ /* globalize all the variables that come from a form called $form .