Or at least, good ideas.

Consistent variable naming. If all of the id fields in a table are called option_id and equipment_id, don’t make a new one called departmentID. And do not then go and put that column in another table and call it deptID. It’s also helpful to name your php variables the same as your table columns.

Documentation. It doesn’t have to be much. As long as it explains what’s going on.

Application security. Seriously. Every time I see $_REQUEST['something'] being used in a query, I want to scream.

Input validation. Do not trust user input.

Learn how to debug code. I am amazed at how many “developers” do not know where to start looking when something is broken.

Indentation and code formatting helps make your code readable. If it’s readable, I have to waste less time trying to figure out what’s going on.

Minimize query damage. Do you need to do that with 3 queries? Can you do it in one? This does not mean you should try to do everything with one query. Also, are you pulling back more data than you need. SELECT * is often unnecessary.

OOP. Get with the program, people. Storing first names in one array, and last names in another array, and departments in another array, and so on, is bad.

Before you start mucking around in something, consider making a backup of the file first.

If you work on another developer’s code after he’s gone home for the day, it’s a really great idea to shoot him a quick email letting him know what you did.