Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private function get_user_settings() {
- $uid = $_SESSION['uid'];
- $row = $this->run_query(
- 'SELECT show_stats FROM user WHERE id = ?',
- [$uid]
- );
- }
- private function post_user_settings() {
- $uid = $_SESSION['uid'];
- $val = ($_POST['show_stats'] ?? 1) ? 1 : 0;
- $this->run_query(
- 'UPDATE user SET show_stats = ? WHERE id = ?',
- [$val, $uid]
- );
- $this->retjson('OK');
- }
Advertisement
Add Comment
Please, Sign In to add comment