Welcome Guest, Not a member yet? Register   Sign In
how to use cart.php on CI?
#11

[eluser]yudahebat[/eluser]
one question for wanadoobtdc,
where u get the number [1],[2],[3] on ?
Code:
function update()
  {
  //$this->load->library('form');
  $this->output->enable_profiler(TRUE);

  $this->cart->update($_POST[1]);
  $this->cart->update($_POST[2]);
  $this->cart->update($_POST[3]);
  
  $this->load->view('v_cart');
  }
what is the meaning of the number??
#12

[eluser]Dam1an[/eluser]
Without reading all the code (too lazy)
When you do [1], [2] etc its an index in an array
So you're accessing the variables at position 1, 2 and 3 in the $_POST array
#13

[eluser]@Frédéric Quié - bleekom.org[/eluser]
Bravo Dam1an, and for yudahebat : just read the code and you'll see that 1,2,3 comes from the $i varaible...

bored to reply to people who are too lazy to learn a bit of PHP( am i not right yudahebat ! )




Theme © iAndrew 2016 - Forum software by © MyBB