I have written a script which pulls previously entered data from a database, and allows the user to edit that data. For the most part this works fine. However, one of the things the user can edit is an image if it has been put into the database. For this I am using a bit of code like this:
<INPUT type="file" name="picture" value="<?php $_FILES['picture']['name']; ?>">
But my dillema is this: if the value for that bit was just the data(url of picture) that had been put into the database, the user would not be able to upload a new picture if he wanted to change it. But if I leave it as is, if the user doesn't want to change the picture, the value will be blank and the picture will be deleted entirely.
Any suggestions??