[KLUG Members] PHP project
Adam Williams
members@kalamazoolinux.org
Thu, 31 Oct 2002 09:54:42 -0500 (EST)
>><option value=\"Byron \">Byron R
>The actual form has the last names in the value (I cleaned them -but
>not the space- before posting source on the web)
trim() is your friend. It is good practice to always call it when
processing strings. Especially when you have a member or procedure that
recieves string paramters, one should always trim those as the first thing
the member/procedure does
function yoyo($mama = "") {
// Limit length of string to 255 characters then drop any leading
// or trailing white space
$mama = trim(substr($mama, 0, 255);
...
return sprintf("%s swims out to troop ships", $mama);
}
You can avoid some real mind grinders, and nefarious tricks, by being
paranoid.
Your mother said not to talk to strangers; everyone on the web is a
stranger. If discretion is 9/10th of valour, then suspicion is 9/10th of
survival.
>I am not very proficient in PHP. I learned by looking at other peoples
>code and then try using it in a different way.
Is there any other way to learn?
>As you can see, I still have some things to learn.
>Hey, at least I do all HTML, ASP and PHP coding in a text editor
>(ok, every coupla months I hit Dreamweaver).
Glimmer, the best code editor. But a &*^$(+_@ to compile.
>Don't you hate when people call themselves _webmasters_
>because they can compose a page in Mozilla. ); ))
If they'll pay me to call them webmaster I'm fine with that. :)
What yanks my chain is someone who "knows computers" because they can use
a spreadsheet (and usually they can't really do that either).
--
----------------------------------------------------------------
This message undoubtedly processed by the purely benevolent "US
Department of Homeland Security", but don't worry... they're
only goal is to protect life, liberty and the pursuit of property.