My classes and functions - is there a better way?
<p>Just been looking at the way I am structuring my classes and wondering it there is a better way.</p>

<p>I have forms which pass the information through to the process class. This class just forwards everything onto my main class which then does the work. When the work is done, it then passes the information through to the database class to carry out the sql.</p>

<p>If in the main class there is an error, the error goes back to the process class. The process class sets a session variable true is the error is there.</p>

<p>It then goes to the referrer which is the original page and on that page I have code which leaves an error message if the session variable is present.</p>

<p>I know this possibly isn't the best way to explain things, but does it sound like a reasonable way to do things?</p>

<p>I am just trying to improve the way I write classes!
Thanks</p>
