Text (will be rendered on display) function displayTutorial($request) { if (isset($request['data'])) { $content = encodeNoHTMLNoBB($request['data']); db_query('UPDATE tutorial SET content = "'.$content.'" WHERE id = 1'); if (db_affected_rows() == 0) { silent_query('INSERT INTO tutorial(id, content) value(1, "'.$content.'")'); } } $content = mysqli_fetch_row(db_query('SELECT content FROM tutorial WHERE id = 1'))[0]; ?>