PHP

Formularios PHP modelo MVC

Submitted by tanny on Tue, 11/28/2017 - 22:05
class FacturaController
{
    public function CrearAction()
    {
        //var_dump( $_SESSION["FacturaController_CrearAction"] );
        if( count($_POST) == 0 )
        {
            /*
            * Permito que se ejecute de nuevo el formulario sólo si 
             * este viene vacio
            */
            $_SESSION["FacturaController_CrearAction"] = TRUE;             
        }
 
        if($_SESSION["FacturaController_CrearAction"] === FALSE)
        {
            //$_POST = [];
            //echo count($_POST);
            header('Location: index.p