I am trying to include a PHP page into another PHP page.
I find it annoying that I have to change the connection info on every page when I upload it to the web host all over agin when I like to edit.
I was wondering if there was a way to include a page that way so I can keep the connection info in one file for all pages.
$username = "a";
$password = "a";
$hostname = "a.com";
$mysqli = new mysqli($hostname,$username , $password, 'a');
For example:
- 1.php
- 2.php
- 3.php <-- this page will hold the info and be include in to pages 1 and 2