<?php // this is the file for all the AJAX Requests from the contact us page. //these are for the PHP Helper files include 'headers/databaseConn.php'; include 'helpers.php'; // for mandrill mail sending API. require_once 'mandrill/Mandrill.php'; if (isset($_GET["no"]) && $_GET["no"] == "1") { // for updating the profile data UpdateProfile($_GET["email"], $_GET["name"], $_GET["contact"], $_GET["profile"], $_GET["table"]); } else { if (isset($_GET["no"]) && $_GET["no"] == "2") { // for loading the profile data LoadProfileData($_GET["email"], $_GET["table"]); } else { if (isset($_GET["no"]) && $_GET["no"] == "3") { // for getting a list of organisations in a drop down list. GetOrganisationsDropDown(); } else { if (isset($_GET["no"]) && $_GET["no"] == "4") { // for adding the course into the database. AddCourse($_GET["name"], $_GET["duration"], $_GET["edition"], $_GET["desc"]); } else { if (isset($_GET["no"]) && $_GET["no"] == "5") { // for adding the organisation/campus into the database. AddOrganisation($_GET["name"], $_GET["contact"], $_GET["address"]); } else { if (isset($_GET["no"]) && $_GET["no"] == "6") { // for getting the courses as a drop down list GetCoursesDropDown();
<?php include_once 'data_access.php'; switch ($_SERVER["REQUEST_METHOD"]) { case 'POST': $postParameter = file_get_contents('php://input'); UpdateProfile($postParameter); break; }