|
Posted by A on 10/12/05 16:21
>>the code above works, but I'm wondering - is this "legal" to do like this.
>>considering $_POST is superglobal it should be OK, but considering it is
>>reserved array it may not be ok... any oppinions?
>>
>>I could rewrite this into something that would fill variables with the
>>$_POST contents but why not doing it directly on $_POST if it is
>>allowed...
>>it is simpler to handle.
>
> I have been doing this for years. Have not been busted by the PHP
> police yet. ;-) All you are doing is assigning a new value to the
> element of an array.
I know but... you never know what might they decide.
I found interesting alternative that will work quickly and effectively
though so I'm sharing it here:
import_request_variables("gP", "rvar_");
and later...
print $rvar_foo;
seems very nice and you can alter priority of get, post or cookie if
required. or import only some of the arrays... or all.. or whatever. i like
it :)
Navigation:
[Reply to this message]
|