Welcome Guest, Not a member yet? Register   Sign In
Validating a series of images.
#1

[eluser]Unknown[/eluser]
Hello, I'm currently trying to work on a form that uploads 6 images - and I need to validate 4 of these images the same, and the other 2 with different rulesets.

I haven't tried any code that I've thrown down yet because, well I'm honestly confused and completely lost on what I'm trying to do here. I'm either going down the right path, or 100% wrong and over-complicating matters. I don't know, brain-fart.

My form is based on a game profile, so I have a name input in this form that I've created a function to clean. (Doom 3: Resurrection of Evil -> doom-3-resurrection-of-evil). Then I've created a function to extract the extension from the file uploaded.

I had originally thought that
Code:
function process_image($file = '', $name = '', $type = '', $number = '')
Would allow for me to process the image and pass the name to the form, and allow for me to build a strict function completely dedicated to processing my images such
Code:
process_image($this->input->post('screena'), $clean_name, 'screen', 1)

But now when I sit here and look at it, and think about it - I just don't even know.

So all I'm really looking for is some help in pointing out the most logical, and correct method for processing this form's images - and to complicate my matters - after the files have been uploaded, I want to create thumbnails for each screenshot uploaded after validation - the boxart will be minimized through CSS, and the icon is strictly 32x32.

So yeah, any help understanding how to work with images in CodeIgniter would be fantastic - and sorry for the extremely stupid questions...that might not even make any sense.




Theme © iAndrew 2016 - Forum software by © MyBB