getPost() not working as expected |
Hi,
I have a simple process in my controller, however if the POST of form input 'first_name' is empty, the statement if($this->request->getPost('first_name') ) is evaluated FALSE and (of course) an exception is reported as $data['employee_data']['first_name'] does not exist. Is this how request->getPost() is supposed to work for empty form input fields? This is quite annoying especially if the form input firld is optional ! PHP Code: if($this->request->getGet('emp_no')){ |
Messages In This Thread |
getPost() not working as expected - by 68thorby68 - 10-29-2020, 03:01 AM
RE: getPost() not working as expected - by InsiteFX - 10-29-2020, 03:31 AM
RE: getPost() not working as expected - by 68thorby68 - 10-29-2020, 04:22 AM
RE: getPost() not working as expected - by paulbalandan - 10-29-2020, 09:38 AM
RE: getPost() not working as expected - by 68thorby68 - 10-29-2020, 12:05 PM
RE: getPost() not working as expected - by ojmichael - 10-29-2020, 04:09 PM
RE: getPost() not working as expected - by 68thorby68 - 10-30-2020, 02:09 AM
|