Re: First stupid post of the year.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, January 2, 2008 1:25 pm, Jack Mays wrote:
> Daniel Brown wrote:
>>>> // Your existing code here....
>>>> $submit = trim(str_replace(' ','',$submit);
>
> Read the docs for trim, you can't use it inline with other functions,

Please point to the specific portion of the docs in which you imagine
this to be written...

:-)

And, technically, if you are CERTAIN the button value will never ever
contain any of the characters '&', 'n', 'b', 's', ';' then you could
use the "new" second arg of trim to do:

$submit = trim($_POST['submit'], "  \r\n\t\x0b\0");

and get rid of all whitespace and the ' ' as well...

Probably NOT a Good Idea in general, however...

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux