Welcome Guest, Not a member yet? Register   Sign In
matrix type of checkbox insert
#5

(This post was last modified: 07-05-2018, 11:34 PM by jreklund.)

Do you get correct values here?
PHP Code:
$matrix $this->input->post('friend_id');
echo 
'<pre>';
print_r($matrix);
echo 
'</pre>'

If so you need to check each line.
PHP Code:
foreach($matrix as $m)
{
echo 
'<pre>';
print_r($m);
echo 
'</pre>';
list(
$regno,$id) = explode ('_',$m);
echo 
'<pre>';
print_r($regno);
print_r($id);
echo 
'</pre>';
$insert[] = array(
'item_id' =>intval($regno),
'user_id' =>intval($id)
);
echo 
'<pre>';
print_r($insert);
echo 
'</pre>';


If you still got a problem, it's in the view.
Reply


Messages In This Thread
matrix type of checkbox insert - by kvanaraj - 07-05-2018, 04:48 AM
RE: matrix type of checkbox insert - by php_rocs - 07-05-2018, 08:25 AM
RE: matrix type of checkbox insert - by jreklund - 07-05-2018, 08:32 AM
RE: matrix type of checkbox insert - by kvanaraj - 07-05-2018, 10:20 PM
RE: matrix type of checkbox insert - by jreklund - 07-05-2018, 11:31 PM
RE: matrix type of checkbox insert - by kvanaraj - 07-05-2018, 11:46 PM
RE: matrix type of checkbox insert - by jreklund - 07-06-2018, 03:41 AM
RE: matrix type of checkbox insert - by kvanaraj - 07-06-2018, 05:01 AM



Theme © iAndrew 2016 - Forum software by © MyBB