public function order() { $objCart = new cart($this->registry->db, $_POST); $id = $objCart->saveOrder(); if ($id > 0) { header('Location: http:index.php?p=product&order=success'); } else { header('Location: http:index.php?p=cart/show&order=fail'); } }