I need a image upload system for admin area
====================================================
I will send the folling variables from previous page.
'item' and 'code'
Suppose,
$item = "laptop";
$code = "LP 256";
$here = "./images/"; // upload root location specified by me
YOUR JOB:
The upload php will create a directory '$here' named '$item' if the directory not exists.
Then upload image to '$item' directory with renaming '$code.imeagetype'.
Check new image name for duplication from file dir not from mySql before upload.
Insert image name '$code.imagetype' only to mysql table.
Display error or successful confirmation after process.
Also include image resizing system.
RESULT:
The script will create "./images/laptop" dir if not exists.
Upload image to "./images/laptop/LP 256.jpg"
Insert "LP 256.jpg" to mysql table
Please help me.............