$hostname = "localhost"; $username = "******"; $password = ""; $dbname = "thesisdb"; /* END DB CREDINTIALS */ /* START CALLING NECESSARY CLASSES */ $thesis = new Controller($hostname, $username, $password, $dbname); /* END CALLING NECESSARY CLASSES */ if (isset($_GET['function'])) { switch ($_GET['function']) { /* START AUTHENTICATION */ case "add_auth": if (isset($_GET['password'])) { echo $thesis->user_details->add($_GET['password']); } else { echo $thesis->encode_output(array('status' => 0, 'message' => "Lack of parameters!", 'data' => NULL)); } break; case "get_auth": if (isset($_GET['password'])) { echo $thesis->user_details->get($_GET['password']); } else { echo $thesis->encode_output(array('status' => 0, 'message' => "Lack of parameters!", 'data' => NULL)); } break; case "del_auth": if (isset($_GET['password'])) { echo $thesis->user_details->del($_GET['password']); } else { echo $thesis->encode_output(array('status' => 0, 'message' => "Lack of parameters!", 'data' => NULL)); }