3 // this part of the example is the part that processes user inputs from forms
4 function processInput() {
7 if(isset($_REQUEST["action"])) {
8 switch($_REQUEST["action"]) {
10 // "users_id" INTEGER PRIMARY KEY AUTOINCREMENT,"users_username" TEXT,"users_fullname" TEXT,"users_tokendata" TEXT
11 $username = $_REQUEST["username"];
12 $fullname = $_REQUEST["fullname"];
13 $sql = "insert into users values (NULL, '$username', '$fullname', '0')";
18 header("Location: index.php?success=created");
21 $username = $_REQUEST["user"];
22 $tokentype = $_REQUEST["tokentype"];
23 $myga->setUser($username, $tokentype);
25 header("Location: index.php?success=Provisioned");
28 $username = $_REQUEST["user"];
29 $tokencode = $_REQUEST["tokencode"];
31 if($myga->authenticateUser($username, $tokencode)) {
32 header("Location: index.php?success=Passed");
34 header("Location: index.php?failure=wrongcode");