Update:Archive/2.0/Developers/Best Practices: Difference between revisions

Jump to navigation Jump to search
m
mNo edit summary
Line 39: Line 39:
* Use variable or function names that are ambiguous (like $var or validate()).
* Use variable or function names that are ambiguous (like $var or validate()).
* Create unnecessary functions.
* Create unnecessary functions.
* Use <? ?> to designate a PHP block.
* Use &lt;? ?&gt; to designate a PHP block.
* Use $array[foo] or $array["foo"] unless it is appropriate (constant or a variable catted with a string).
* Use $array[foo] or $array["foo"] unless it is appropriate (constant or a variable catted with a string).
* Loop MySQL queries.
* Loop MySQL queries.
Line 46: Line 46:
* Build URLs including Session ID (''SID should be "automagically" added by PHP if we're using a no-cookie configuration'').
* Build URLs including Session ID (''SID should be "automagically" added by PHP if we're using a no-cookie configuration'').
* Use inline styles.  Ever.
* Use inline styles.  Ever.
* Use <table> for desgin
* Use &lt;table&gt; for design
* Duplicate DOM IDs.
* Duplicate DOM IDs.
* Use $_GET and $_POST with extra checks if the input could come from either GET or POST
* Use $_GET and $_POST with extra checks if the input could come from either GET or POST
1

edit

Navigation menu