By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,040 Members | 1,815 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,040 IT Pros & Developers. It's quick & easy.

How to delete picture file on server using PHP?

P: 4
Hi,
I want to upload pictures in mysql database using blob. I have code to check the extension and sizes. But to store in mysql i have to upload the picture on server first. But if i upload the picture, i have to delete it asoon as the picture is loaded in mysql else there will be alot of unwanted pictures. Pls help how do i delete pictures on server using PHP. Also if u have simple code to upload pictures in mysql...i would be delighted to have it.... :)

Thanks in advance...
-sam
Jun 17 '06 #1
Share this Question
Share on Google+
1 Reply


hsriat
Expert 100+
P: 1,654
Hi,
I want to upload pictures in mysql database using blob. I have code to check the extension and sizes. But to store in mysql i have to upload the picture on server first. But if i upload the picture, i have to delete it asoon as the picture is loaded in mysql else there will be alot of unwanted pictures. Pls help how do i delete pictures on server using PHP. Also if u have simple code to upload pictures in mysql...i would be delighted to have it.... :)

Thanks in advance...
-sam
While uploading, PHP saves the files temporarily which is deleted automatically after the scrips ends. But if you are first saving it with another name (which is not recommended), then you can delete them by unlink.
May 24 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.