473,395 Members | 1,468 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

How to delete picture file on server using PHP?

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
1 4831
hsriat
1,654 Expert 1GB
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

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

Similar topics

4
by: news.microsoft.com | last post by:
I need some help here guys.... i have been simply trying to delete a file from the webserver using asp.net using the following code. System.IO.File.Delete(FullPath); however the error message...
5
by: JoskeXP | last post by:
Hi, When I use the following code I have a error that the file is in use If File.Exists("c:\RegistratieMD\images\" + Me.txtBarcode.Text + ".jpg") = True Then...
1
by: apple | last post by:
i try to print image file in a directory using PrintDocument. It will raise printPage event to draw image to the printer. The file will be deleted after print and the directory will be checked...
13
by: Jim Carlock | last post by:
I have over a hundred pictures I would like to present. Is it practical to create and parse an array of pictures, picture paths, et al using server-side scripting to accomplish this? I...
5
by: Tom Scales | last post by:
I am having a problem with an application I am writing in vb.net 2003. I display an image (JPG) on the screen using a Picturebox, loading it with image.fromfile. The user can select a key to...
6
by: Jeff | last post by:
Hey (and thank you for reading my post) In visual web developer 2005 express edition I've created a simple website project.. At this website I want users who register to be able to upload a...
1
by: ApexData | last post by:
I have an ImageBox with PictureType set to LINK. I have a string with a path strPicFolderPath = "C:\Pictures" In the OnCurrent event of the form I have this code: If...
3
by: davidson1 | last post by:
Posted Date :- 17 feb 2008 Hello to everybody, I am very thankful to "the scripts" contributors. Their answers are really useful to me. Now i have a Question I am storing a image in...
4
by: gerardianlewis | last post by:
Any help appreciated. (VB.NET under XP and Vista, SP1 installed) My code, inherited from a VB6 version of an app that ran under W98, loads an image from a file into a PictureBox. The user may...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.