Created controller.php to act as an interface between the
javascript code and php.