How to NOT overwrite a value upon update...
Posted on 2004-09-16
I have a back-end user interface. The user can add a news story and upload picture (via ASPSmartUpload) to his site. This is how it flows:
Add a Story (uploads images upon click) ----> Confirm the Story (recalls uploaded images for confirmation) ----> Write the record.
The user can then edit that story. The process is the same. I call all the record values into form fields for editing.
Step 1: Recall the Story and edit it (and upload new images if necessary) ----> Step 2: Confirm the changes ----> Step 3: Update the record
However, my problem is this: The user may not always upload new images. When he DOESN'T upload new images in Step 1, the "image" form field in the confirmation form is blank, which passes a blank value back into the database for an update. Is there any way to basically say, "If no new image is uploaded, always keep the old image path in the database?"
I know this is confusing. If you're interested in seeing it in action, let me know and I'll post the link. It's a test database anyways.