How to upload image in monthly folder. If not available then create.

Hi,

I am working on a magazine website. everything goes well.

There is one problem…

I want to creating a image upload facility that needs certain string as below…
my path to images as “/images/news/currentyear/currentmonth/”

  1. Its check that folder “/currentyear/currentmonth/” exits or not.
  2. If not exits then it create folder for “/currentyear/currentmonth/” else upload image in “/currentyear/currentmonth/” folder.
  3. It also create thumbnail of width=100 height=auto in “/currentyear/currentmonth/thumb/” folder.
  4. It send “$url(/currentyear/currentmonth/)$imagename” and “$url(/currentyear/currentmonth/thumb/)$imagename” to sql table witch have fields picid, thumb, picture, newsid.

Okay… Only these are the requirements.

any help is appreciated.

Thanks…

An idia and method isnt a problem. Show us code and areas you are having issues with.

Sponsor our Newsletter | Privacy Policy | Terms of Service