$col = 'bookmarked'; //### it may be necessary to sanitize the input.. but prepare/execute may not need it $value = $_REQUEST['bookmark']; } elseif (isset($_REQUEST['comments'])) { //### need to be decide how it works $col = 'comments'; $value = $_REQUEST['comments']; } elseif (isset($_REQUEST['persnote'])) { $col = 'personal_note'; //### it may be necessary to sanitize the input.. but prepare/execute may not need it $value = $_REQUEST['persnote']; } else { error('unrecognized command'); } $timer->setMarker('setup'); if (!UserArticle::setColumn($u, $a, $col, $value)) { //Probably it doesn't exist error('Update on the server failed!'); } $timer->setMarker('query'); InsertBenchmarkDB($timer); //Save the data on DB echo '{"result": "OK"}'; if (isset($XML_debug)) { $timer->display(true); // if you want to display immidiately and to output html formated //$profiling = $timer->getProfiling(); // get the profiler info as an associative array //echo "<br> This is the array: <br> <pre>"; //print_r($profiling); //echo "</pre><br>"; }