Form result error

Lu Jia

Active member
Code:
Server Error

Undefined index: group_name

XenForo_Application::handlePhpError() in ExternalPages/ControllerPublic/En/Creategroupgo.php at line 7
ExternalPages_ControllerPublic_En_Creategroupgo->actionIndex() in XenForo/FrontController.php at line 310
XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
XenForo_FrontController->run() in /var/www/vhosts/domain.com/httpdocs/index.php at line 17

this error will appear if i try to directly go in the form result's page, by-passing the form page, i want to know if it's possible to force users to go in form's page

I tried a if ($_POST['group_name'] == NULL) {
echo "go to form page";
} else {
form output code
}

but it doesn't work :(
thanks in advance
 
PHP:
if ($this->_request->isPost()) {
          .. do something
}
else{
             return $this->responseView('foo', 'bar', array());
        }
 
thanks! it works great!
Is it possible to do it with templates too like <xen:if> <xen:else />?
 
AFAIK not, but that's really something that shouldn't be in the template!
 
PHP:
if ($this->_request->isPost()) {
          .. do something
}
else{
            return $this->responseView('foo', 'bar', array());
        }

PHP:
if ($this->_request->isGet()) {
          .. do something
}
else{
            return $this->responseView('foo', 'bar', array());
        }

how can I do it works with method GET too?
 
Top Bottom