I am trying to access one PHP file from two PHP files.
insert.php file is used to insert values into a certain table and then modify.php file is used to modify the values of the table.
I want to write two functions in database.php -- one for inserting and another for modifying. And I want to include this file into insert.php and `modify.php
I just want to execute only insert function from database.php and insert.php page call and execute only the modify function from database.php when modify.php page is called.
Is there any possibility to do this?
if($insert) { include 'insert.php'; }.....