I am trying to optimize my php code and I realize I am including the 'init.php' which contains the code connecting to database in every single php page. The further problem is that with every user click I essentially load another php script which mean I load the 'init' script with every single click.
is session relevant here? Maybe if I start a session and those scripts would not be included again? Or is using include_once solve the problem?