PDA

View Full Version : Image disappears after edit category fix



michael_s
06-14-2007, 10:11 AM
The correct code to be replace would be

if (!is_null($categories_image->filename)) {
tep_db_query("update " . TABLE_CATEGORIES . " set categories_image = '" . tep_db_input($categories_image->filename) . "' where categories_id = '" . (int)$categories_id . "'");
}

There was an extra } at the end>>
// if (!is_null($categories_image->filename)) {
tep_db_query("update " . TABLE_CATEGORIES . " set categories_image = '" . tep_db_input($categories_image->filename) . "' where categories_id = '" . (int)$categories_id . "'");
}
}
//

Credits to Abhinav Vishwanathan

More... (http://www.oscommerce.com/community/contributions,5156)