Welcome Guest, Not a member yet? Register   Sign In
validating non form data
#2

[eluser]pickupman[/eluser]
The form validation class can only check if file has been uploaded. I do this same very thing as you are trying. I am uploading price sheets in CSV, and if the data matches, it is inserted/updated in DB. Use the validation class to check file has been uploaded. If the file has been uploaded, use fopen() or load the CI file helper, and use read_file(). I run the file through a loop reading each line. I use a regular expression to check the fields in each row. If it passes the regex test, I added it to the DB.


Messages In This Thread
validating non form data - by El Forum - 05-14-2010, 06:12 PM
validating non form data - by El Forum - 05-14-2010, 08:07 PM
validating non form data - by El Forum - 05-17-2010, 11:29 AM



Theme © iAndrew 2016 - Forum software by © MyBB