Freelancers Network
 
skill list top cap
Homepage
Join the Freelancer's Network
Update your details
Find a freelancer
Post a project
Find a project
Projects Archive
Post a job
Find a job
Jobs Archive
See Dan's Pages
See Andy's Pages
Link to this site
Resources
Join/Leave Forum
Forum Messages
+Additions+ Adverts
Advertising
Contact Us
Subscribe to our newsletter - enter your email address and hit return
Freelancers.net is owned and operated by Andy Stowell and Dan Winchester
skill list end cap
guru web hostcom

Find me again on Freelancers.net

FN-FORUM: Can anyone help here

date posted 22nd July 2004 15:24

Hi,

Is there a php guru out there that could possibly help me with the
following.

I have a script which I include, this script is to upload images to a
specified directory. The user justs selects an image for a particular month
on the calendar, and then uploads an image for that month.

The problem is that I need the following. If the user decides that the imag=
e
they have uploaded is incorrect and wish to upload a new image, I need a wa=
y
of deleting the old image off the server. Now I have never done this before=
,
and I know you can use unlink. The problem is that the form contains the
name month1pic and I have a query to either not do anything if they just
click upload and not enter anything, or if they click upload to replace tha=
t
image. But if the image is not the same we have more than one image for a
month chosen. I have an mysql database which stores the image names, but I
need to delete the images not used.

Is there a way of doing this?

Here is my script below which uploads the image to the server or updates th=
e
image, you will notice I have not used unlink at all here, I have tried but
it fails.

--------------------------------------------------------
MY SCRIPT FOR ONE OF THE IMAGES



Messages by Day
July 31st 2004
July 30th 2004
July 29th 2004
July 28th 2004
July 27th 2004
July 26th 2004
July 25th 2004
July 24th 2004
July 23rd 2004
July 22nd 2004
July 21st 2004
July 20th 2004
July 19th 2004
July 18th 2004
July 17th 2004
July 16th 2004
July 15th 2004
July 14th 2004
July 13th 2004
July 12th 2004
July 11th 2004
July 10th 2004
July 9th 2004
July 8th 2004
July 7th 2004
July 6th 2004
July 5th 2004
July 4th 2004
July 3rd 2004
July 2nd 2004
July 1st 2004


Messages by Month
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004


Messages by Year
2008
2007
2006
2005
2004
2003
2002
2001
2000