honestly, I think you are going to have to do a search on your codebase .. (grep -r 'resultsCode' /path/to/www (or find in files in windows)) and anything that is actually an error change to `errorCode` , then in your results script check if `errorCode` or `resultsCode` has been passed and act accordingly, I assume you probably just need to check for that at the sending email stage ?
[The alternative would be to add some flag in the value of resultsCode indicating and error or a message but this is probably more work and still requires editing lots of files?]
I cant think of anything off of the top of my head that is ging to be an easier way out since the problem is in lots of places whichever way you go about fixing it?
your switch is a bit long winded and probably you would be better off searching an array of error codes ? not that it really matters either way.
MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)