function price_admin_page() { if (isset($_POST['mfdvc'])) { $price = json_encode($_POST); $box = new Box(); $box->add_price_option($price); see_price(); } else { see_price(); } }