I have a single page application. Select boxes need to be filled with select queries from the database.How do I structure the application?Currently I have a file add_details.php. It contains a HTML form with select queries to fill select boxes and if a user submits a form.if ($_SERVER['REQUEST_METHOD'] == POST) {    // Code for inserting data }The below code is executed all in one page.Should I separate and create a PHP file for insert and a PHP file to get results from the database?I find separating things makes things cleaner but results in far too many files being created for select queries and inserts.I use require_once 'SELECT query file' to populate the select boxes is there any easier way to do the above? is it necessary to create a a separate select query file?
php Database operations in separate files?
php;mysql