Welcome Guest, Not a member yet? Register   Sign In
Pass a variable between a controller
#6

[eluser]Pascal Kriete[/eluser]
Wacky, the function is in the same controller - no need for [strike]ugly[/strike] alternative solutions.

The easiest way to do this, is to just call that function after you upload and a) pass the data as a parameter, or b) put it in a class variable (as you're doing now).
Code:
$this->parse_csv($data);

If you're going to display a link that the user has to click - that's two requests, you need to either store the data in a file, db, or the session.
If you're using CI sessions, putting it into the session cookie would be mighty redundant, since the user just uploaded the file to the server. FWIW, I would ask if they want to parse it in the upload form, instead of showing a link as an afterthought.


Messages In This Thread
Pass a variable between a controller - by El Forum - 07-29-2008, 04:48 AM
Pass a variable between a controller - by El Forum - 07-29-2008, 04:58 AM
Pass a variable between a controller - by El Forum - 07-29-2008, 07:13 AM
Pass a variable between a controller - by El Forum - 07-29-2008, 10:00 AM
Pass a variable between a controller - by El Forum - 07-29-2008, 11:13 AM
Pass a variable between a controller - by El Forum - 07-29-2008, 03:20 PM
Pass a variable between a controller - by El Forum - 07-30-2008, 01:04 AM
Pass a variable between a controller - by El Forum - 07-30-2008, 03:08 AM



Theme © iAndrew 2016 - Forum software by © MyBB