Just a note on this code... You could shorten the top listed portion by a few lines -- there's no need for the ELSE if it's a condition that always happens. Semi off-topic, but I tend towards efficiency in code wherever possible. -- Joe if (!file_exist($user_name)) { mkdir($user_name); } image_upload(); > Hi Aravind, > > However you have kept the user_name or user_id in session and also > user_name is a unique. So you can create your folder named user_name. > > if (!file_exist($user_name)) { > mkdir($user_name); > image_upload(); > } > else { > image_upload(); > } > > function image_upload() { > // add the image upload codehere > } > > > Thanks & Regards > Udayakumar Sarangapani > Sr. PHP Developer > CompIndia Infotech Pvt. Ltd. > Chennai. > > "Science is nothing but logic..."