title: form_open in codeigniter
body: <p>I have a url that looks like this:</p>
  
  <p><a href="http://localhost/store/mens/category/t-shirts/item/a-t-shirt" rel="nofollow">http://localhost/store/mens/category/t-shirts/item/a-t-shirt</a></p>
  
  <p>I have a class called store and at this point in my application the item function has been called and some data about a product has been output on the page. </p>
  
  <p>I need to allow a user to add the item to a basket. I know CI provides a library to help with this and I've built a simple class that will interact with this library to create the shopping cart functionality. Problem is I don't understand how I'm supposed to get the form to submit to my shopping cart class and then return to the current url with all the parameters intact like above. Using:</p>
  
  <pre><code>&lt;?= form_open('cart/addItem',array('class' =&gt; 'basketForm')); ?&gt;
  </code></pre>
  
  <p>submits to the correct class but then I have no mechanism to get back to the product page afterwards.  </p>
  
  <p>The only way I can think to do it is to send the url along to the cart class and redirect once the cart stuff is done....or use AJAX...but both seem like hacks to get this working.</p>
  
  <p>Is there a clean way to do this?</p>