prepare($query); $sth->bindValue(":username", $_SESSION['username'], PDO::PARAM_STR); $sth->bindValue(":comic", str_replace("/", "", $_SESSION['compath']), PDO::PARAM_STR); $sth->bindValue(":issue", $_SESSION['comfile'], PDO::PARAM_STR); $sth->bindValue(":currentpage", $page, PDO::PARAM_INT); $sth->execute(); $data['message'] = "Page set to $page for {$_SESSION['username']} reading {$_SESSION['comfile']}"; header('Content-Type: application/json'); echo json_encode($data); exit();