$otpNum = $util->randomNumber(6);
     $otpMsg = $msgObj->otpMessage($otpNum);
     // Send Message
     $content = $msgObj->sendPhoneMessage($sendPhone, $otpMsg);
     //    echo $content;
     // Insert into Database
     $acc = new UserAccounts();
     $reqId = $acc->registerByStateAndPhone($sendPhone, $state, $staffID);
     $acc->addOTPatRegister($otpNum, $reqId, $otpCount);
     echo $reqId;
 } else {
     if ($action == 'validateOTP') {
         $otpNum = $_GET["otpNumber"];
         $regID = $_GET["regId"];
         $acc = new UserAccounts();
         $result = $acc->validateOTP($otpNum, $regID);
         echo $result;
     } else {
         if ($action == 'updateRegistration') {
             $util = new Utils();
             $regId = $_GET["regId"];
             $username = $_GET["uName"];
             $d_pwd = $util->randomNumber(10);
             $password = md5($d_pwd);
             $firstName = $_GET["fName"];
             $lastName = $_GET["lName"];
             $staffID = $_GET["staffId"];
             $emailID = $_GET["email"];
             $designation = $_GET["designation"];
             $active = '0';
             $acc = new UserAccounts();