Welcome Guest, Not a member yet? Register   Sign In
How to access values returned from view form
#1

[eluser]TWP Marketing[/eluser]
I'm stuck on a point using the cart library.
The userguide (SVN) page gives an example of how to pass the 'rowid' and 'qty' values from the view form to the controller/model.

Code:
<?php echo form_hidden($i.'[rowid]', $items['rowid']); ?>
<?php echo form_input(array('name' => $i.'[qty]', 'value' => $items['qty'], 'maxlength' => '3', 'size' => '5'));

This is accessed using $this->input->post () and I can see the posted values using profiler, for example

Code:
_POST[1] array( [rowid] => 7c9d5fbcdc5ae18a05e0b792cfccafbf, [qty] => 1);
_POST[2] array( [rowid] => 8ddf6ceb54ab84a0e9eab4765f4cabcd, [qty] => 1);

Noting the array keys "[rowid]" and "[qty]" do _NOT_ fit the proper expression for array indexes (I think),
How do I reference these posted values?

I've tried the following, which fail to return anything, (empty string), or produce a php warning of incorrect usage of index:
Code:
$rowid = $this->input->post ($i.'[rowid]');
$qty = $this->input->post ($i.'[qty]');

Thanks
Dave


Messages In This Thread
How to access values returned from view form - by El Forum - 07-13-2009, 12:31 PM
How to access values returned from view form - by El Forum - 07-13-2009, 01:52 PM
How to access values returned from view form - by El Forum - 07-14-2009, 10:51 AM



Theme © iAndrew 2016 - Forum software by © MyBB