db->query($q); } public function create_post($caption, $post){ $q = "INSERT INTO `posts` SET `caption` = " . $this->db->escape($caption) . ", `post` = " . $this->db->escape($post) . ", `user_id` = " . $this->db->escape($_SESSION['user']['id']); $this->db->query($q); } }