Here is a simple piece of PHP code to create a internal phone list. It has no styles applied to it so you can integrate it to your own site. I used MySQL for the database. You need to create a database called telephone and create a table in that database called employee. You can also modify the db.php file if you wish to use another name. The following sql will create the database for you.
CREATE DATABASE telephone; USE telephone; CREATE TABLE `employees` ( `number` varchar(10) NOT NULL, `name` varchar(50) NOT NULL, `department` varchar(50) NOT NULL, `extension` varchar(10) NOT NULL, PRIMARY KEY (`number`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `employees` (`number`, `name`, `department`, `extension`) VALUES ('1', 'Frank', 'Finance', '200'), ('2', 'Joe', 'HR', '201');