阅读背景:

更新数据库表单:未选择文件时将图像字段留空

来源:互联网 

i'm creating a content management system so that the database can easily be updated. i've created an update page that lets the user edit entries in the database, and they can upload new images and edit any of the fields without any problems. the problem i have, is that if you just want to edit, say just the text in one field, but you don't want to change the images, when the form is submitted, it overwrites the image field with a blank entry. what i want to be able to do is for the original image to remain if no other file is selected. i know that i need to check if a file has been selected but i can't seem to find a way of doing it that works. i'm sure it's probably something simple, but here's the script i have for the upload:i'm creating a content management system so tha




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: