Posted by Schraalhans Keukenmeester on 05/22/07 22:35
At Mon, 21 May 2007 10:17:15 -0700, damezumari let his monkeys type:
> // trim the parameters
> foreach($_POST as $varname => $value) {$varname = trim($value);}
>
> // give them $p_ prefix
> import_request_variables('gp', 'p_');
>
> When I do the above the parameters are not trimmed in the end.
>
> Example:
>
> $lastname = ' ' is trimmed to $lastname = '', but $p_lastname = ' '
foreach ($_POST as $key=>$value) {
${'p_' . $key} = trim ($value);
}
I'm not saying I like this solution, but this does what you asked.
Sh.
[Back to original message]
|