What is a good way to remove the code from display pages when developing with PHP. Often the pages I work on need to be editted by an outside person. This person is often confused by lots of blocks of PHP, and also likes to break my code.
I’ve tried moving blocks of code out into functions, so now there are functions spread out all throughout the HTML now. As some pages become more complex it becomes a program again, and processing POSTs are questionable.
What can I be doing better in my PHP development?
You don’t need a ‘system’ to do templating. You can do it on your own by keeping presentation & logic separate. This way the designer can screw up the display, but not the logic behind it.
Here’s a simple example:
Now here’s the people.php file (which you give your designer):