- STFW, you're most probably not the first person having that particular problem
- don't assume anything. if in doubt, check the documentation
- code for errors (be paranoid, everyone wants to exploit your code)
- indent your code
- comment your code
- never ever trust user data
- separate languages
- know what PHP is intended to do (what it can do and what it can't)
- logic first, code afterwards. make clear (visualize) what you want to do and how the programme logic should go
would you add/remove something to/from the list?
word your opinion, now!