I have a form that can either add icon or a icontext. The problem is, that icon is unlinked from file path when I submit form without change.
if (isset($_POST['icontext'])) { // echo '<pre>';print_r($_POST['icontext']);exit;
if(file_exists(UPLOAD_PATH . 'images/highlights_icon/' . $this->view->highlights['highlighticon'] )) {
unlink(UPLOAD_PATH . 'images/highlights_icon/' . $this->view->highlights['highlighticon']);
//echo '<pre>';print_r($this->view->highlights['highlighticon']);exit;
}
}