Welcome Guest, Not a member yet? Register   Sign In
Uploading an image with form_validation
#3

[eluser]Xeoncross[/eluser]
True, it is better if you move the do_upload() function call to the actual method calling the validation - but I have it like this because it is "plug and play" for someone to just paste into there controller.

Also, you should not set new variables from methods - they should all be defined in the class so that people working on this class don't get weird results when they happen to create a variable named the same thing. Doing it this way makes sure that everyone knows what variables are in effect just by looking at the constructor or class.

Especially since CI passes these values into libraries and models it loads!


Messages In This Thread
Uploading an image with form_validation - by El Forum - 02-07-2009, 05:25 PM
Uploading an image with form_validation - by El Forum - 02-08-2009, 10:59 AM
Uploading an image with form_validation - by El Forum - 02-09-2009, 09:47 AM



Theme © iAndrew 2016 - Forum software by © MyBB