• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Form result error

Lu Jia

Active member
#1
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
 
R

ragtek

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

Lu Jia

Active member
#6
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?