$oper->processed($table_name, $_POST["response"], $_POST["id"], $_POST["url"], $_POST["user"]); } else { if ($action == "exit") { $oper->processed($table_name, "TODO", $_POST["id"]); } else { if ($action == "label and skip url") { $oper->processed($table_name, $_POST["response"], $_POST["id"], $_POST["url"], $_POST["user"]); $oper->skipUrl($table_name, $_POST["response"], $_POST["url"]); } } } } // check whether there is more to show $count = $oper->countRows($table_name); if ($count == -1) { $oper->createTableAndLoadComparisonTask($userFile, $googleFile, $table_name); // $oper->createTable($table_name); // $oper->loadComparisonTask($userFile, $googleFile, $table_name); } else { if ($count == 0) { die("The table has no items"); // $oper->loadComparisonTask($userFile, $googleFile, $table_name); // $result = $oper->processing($table_name); // $count = $oper->countRows($table_name); } else { if ($count > 0) { $result = $oper->processing($table_name); } } } echo "Current id: " . $result["id"] . ", Total count: " . $count . "<br>";