Database is usually a sql of one or the other and the php code is in files mostly called by javascript or html code.  First thing is to design the database and tables as always.  Of course, this is almost an art in itself anymore because a small part of the program is imbedded in the databases. We utilize forms, panels, ux, grids and a few other things that form the basis for the application.  They are used for input and showing data.  Then we build the reports.  Usually pdf format, but can be any form necessary.   We make sure there is ajax involved to help with speed.

I use a php generator for the initial development.  It helps me for the basis for the project and all the parts needed.  Once done, it is time to modify the generated code one line at a time.  Having done that, we make the html and javascript with css for the user to have something to look at on a browser.  The idea is for someone to click a website, read what they need, input data, save it, view it and print a report.  Speed is important or they lose interest.  I spend over $2000.00 a year on just php related tools to keep my work at the highest standards.