Hello,

I'm working on a class file where I like each method called and executed within the class.
In the event a method or methods run into a problem it should update the error array with the
appropriate err msgs.

the last method would verify whether error array is empty or not
if empty process the upload if not display the content of the error array.

This posting is more or less how to run all 4 methods within the class or have the last method
process the 3 methods .

$upload = new Testing(var)
$upload->processimage() - should either bring back the err message or complete the upload process pending it meets all
of the critters set by the other methods.


Markup code/class


Class Testing
{

public errCheck = array();

public function recordCount($_FILES['data'])
{ if(!count($_FILES['data']['name'] ) <= $file_Count)
{ $this->errCheck[] = 'The system only allows your to upload 3 images/files'; }
}


public function checkimageFormat($_FILES['data'])
{ if (!jpg, png, gif)
{ Add message to errcheck[] = "incorrect format"; }
}

public function checkimageSize($_FILES['data'])
{ if (!jpg, png, gif)
{ Add message to errcheck[] = "incorrect size"; }
}


public function processimage()
{ -run the above methods
-check errCheck array to determine if the methods appended any err msgs.

if empty upload files.
if not empty send error message back
}



}