Best Code Structure Technique PHP
<p>I've been thinking long and hard about the best way to structure the code for a project I'm currently working on, to allow for easy development and management.</p>

<p>Upon carrying out a search on the internet relating to this subject, it has been mentioned more than once, that it is a good idea to separate presentation code from logic (e.g. HTML from PHP)</p>

<p>I am keen to obtain a better understanding on how you guys would code a simple page that displays information from a database and requires some sort of user input, whilst allowing for error messages to be displayed, if the user incorrectly completes what was asked of them.</p>

<p>Also, I'm currently looking into the best way to link different pages together within my application. I've checked out some forum software (phpBB, myBB and smf) for inspiration and they all tend to link to different pages of the website via a main index.php file, containing a switch statement. Is this the best way, or are there other techniques that could be used? - What are the advantages/disadvantages of this approach?</p>

<p>Of course, choosing the best structure to use at the beginning of a project is highly important, as this will then need to be adopted throughout the application.</p>

<p>If you could provide examples of code or point me in the right direction, it would be much appreciated.</p>
