getting form data from $_REQUEST - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: getting form data from $_REQUEST (/showthread.php?tid=78157) |
getting form data from $_REQUEST - richb201 - 12-06-2020 I have a form that when a user hit's submit $_REQUEST gets populated. The problem is that there are three separate areas on the form. The first area is called Please_check_off_Business_Components_workedon and it can have from zero to many items. I need to take each item and write it out to a mySQL table. I am trying to get the number of items so I can iterate through each and write it out. But the following command to get the number of items is not working. $iCount= count( $_REQUEST['Please_check_off_Business_Components_workedon', COUNT_RECURSIVE ); Has anyone used this command before? I thought about using element() but I think that might only work with the top level of the array. Once I get the $iCount my plan is to get each item with for ($i=0;$i<$iCount;$i++) { $item=$_REQUEST['Please_check_off_Business_Components_workedon'][$i]; //write out to table } will this work on $_REQUEST? |