fatal error: how to solve this
Permalink 1 user found helpful
I get this error, how to solve this error
Fatal error: Call to undefined method View::redirect() in /home/kumar/public_html/amsConcrete/single_pages/employee/add_employee.php on line 11
thanks
Kumar
Fatal error: Call to undefined method View::redirect() in /home/kumar/public_html/amsConcrete/single_pages/employee/add_employee.php on line 11
thanks
Kumar
Hi rony,
actually i am save the new user details through method add_user()
after save i have to show the message to create successfully
controller:
single page:
I want refresh page as well as i want to show the message success. but the page is refresh but not show the message vice verse .
thanks now i get idea by using the script to refresh but i dnt know message will show or not?
thanks
Kumar
actually i am save the new user details through method add_user()
after save i have to show the message to create successfully
controller:
function add_user(){ $ui = employeeinfo::adduser($data); if(!isset($ui)){ $this->set('response', t('Save Successfully')); } $this->redirect('employee/add_employee'); }
single page:
I want refresh page as well as i want to show the message success. but the page is refresh but not show the message vice verse .
thanks now i get idea by using the script to refresh but i dnt know message will show or not?
thanks
Kumar
Something like this would help!
then create a function called "emp_added" and set your message.
Rony
$this->redirect('/employee/add_employee/', 'emp_added');
then create a function called "emp_added" and set your message.
function emp_added(){ $this->set('message', t('Employee added successfully.')); }
Rony
Hi thanks rony, the idea is good...
You could use a JavaScript redirect, which works the same as it does anywhere else (so nothing specific to concrete5). Or you could put the redirect into a page controller (this is a bit more complicated, and really depends on exactly what you're trying to do -- i.e. under what circumstances are you wanting to redirect people and to where do you want to redirect them?)
Rony