class.upload.php is a powerful and mature PHP class to manage uploaded files, and manipulate images in many ways. The script is available under a GPL license.
more info about the class
I solved it!
i changed this line ;
$handle = new upload($_FILES[$q[2]]['name']);
to this;
$handle = new upload($_FILES[$q[2]]);
and now it works fine.
Thanks for your all effort to help me out and for this amazing class.
All the best.
Ps: i use the newest version. 0.32