shopping cart content rows?

#1
[eluser]Unknown[/eluser]
I'm writing a shopping cart, but I found the contents of my shopping cart can only have a maximum of 4 pen.

So I use the following code to try, I found that the contents of only up to 6 pen
Can anyone tell me how to solve this problem?

Sorry for my bad english.

Code:
&lt;?php for($i=0;$i<10;$i++){?&gt;
&lt;form action="" method="post"&gt;
    &lt;input type="hidden" value="&lt;?php echo $i;?&gt;" name="id"&gt;
    &lt;input type="submit"&gt;
&lt;/form&gt;
&lt;?php } ?&gt;

&lt;?php
$data = array(
    'id' => $this->input->post('id'),
    'qty' =>1,
    'price' => '100',
    'name' => 'a'
);

$this->cart->insert($data);
$cart = $this->cart->contents();
print_r($cart);
?&gt;

#2
[eluser]Unknown[/eluser]
I change my php version 5.2.6 to 5.3.10.

this phenomenon does not happen again

Orz...

but I still don't know why..


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.