I was wondering if I could please have some help with a PHP issue I'm having?
I'm a beginner and I've been working on making a basic CMS as a personal project to build my skills with.
It's all working so far, but on the admin page which updates the site, I'm having a problem with the updating part.
The page is populated by DB information, and it is updating when I choose to submit the update form. But if I only alter the text and don't re-select an image, or update the form without choosing a new image, the form sends an empty string to the database which erases the image that was there.
Here is the original code for the page:
Код: Выделить всё
Источник: [url]https://stackoverflow.com/questions/78111516/updating-php-cms-admin-erases-image[/url]
Мобильная версия