Its a basic If statment datahound, the whole point of it was so math.php does not get included? Instead of using an else (which they should of done?) they just quit PHP inside the IF.
And looking at that mess, i'm glad I do ASP.NET where there are 3 distinct layers:
- Presentation
- Application
- Data
For the OP, Have you got an example online, would make it easier to diagnose exactly what isnt working.