query("SELECT a.gallery_id, a.category_id, a.title, a.file, a.status, a.created_at, a.updated_at, b.staff_id, b.staff_idno, b.staff_name FROM association_gallery a LEFT JOIN staff b ON ( a.staff_id = b.staff_id ) WHERE a.gallery_id = '".$gallery_id."' LIMIT 1"); if ($mysqli_page->num_rows > 0){ // keep query value in array $row_page = $mysqli_page->fetch_array(MYSQLI_ASSOC) ; }else{ exit ; } // update database if ( $_POST['hide'] == 1 ){ // update database $mysqli->query( "UPDATE association_gallery SET category_id = '".escapeString($_POST['category_id'])."' WHERE gallery_id = '".$gallery_id."'" ) ; // refresh page header("Location:app-association-gallery-view.php?page_mode=edit&gallery_id=".$gallery_id."&success=1") ; $_SESSION['system_result'] = 'success-updated' ; exit ; } // start header here include 'requires/page_header.php'; include 'requires/page_top.php'; ?>