Upload image to a folder and display

Hello friends… can help me to upload the image to an folder how can i do it pls tell and i need to display it from the folder…pls help me through the coding where i need to pass all type of imagess like jpg,png,gif after all i need it very urgent if you can pls explain me through the codes…

We aren’t here to do your work for you.

So, try it yourself and if you have problems, come back.

hello friend i have the code to upload the image but the problem comes for me how to call it back from folder like how can i tell i need to make the folder automatically and upload the image inside tht and display the image to the page… i know how to make the uploading but how to create a folder automatically and display the image from their thts the doubt for me

Ok, well to create a folder you use the mkdir() function - to see if it already exists use file_exists:

$Directory = 'Uploads'
if(!file_exists($Directory)){
    mkdir($Directory) or die('Cannot create upload directory. @Admin: Make sure permissions are correct');
}

To display the image:

printf('<img src="&#37;s/%s" alt="uploaded image" />', $Directory, $ImageName);

If you need more assistance, can you post what code you have at the moment?

ok friend thank you for the responce see wht i have done for the image uploading while uploading any 1 will upload with the same name of the image which is already their in the folder… to avoid this i addded the time(). function with the image name so the thing is that the problems comes if the user gone and he will come back in his login file he should see all his images from the folder tht i know how to do but i dont know how to delete this image from the folder… if you know tell me and thank for the helping mentality really i am new to this image php play thts why…