query("SELECT * FROM setting"); while($rr = $set->fetch_assoc()) $setting[$rr['type']] = $setting[$rr['id']] = $rr['value']; $logo = $con->query("SELECT * FROM logo_setting where id = 1")->fetch_assoc(); define('WEB_LOGO','uploads/logo/'.$logo['logo']); define('WEB_FAVICON','uploads/logo/'.$logo['favicon']); function getSetting($key,$res=''){ global $setting; if(isset($setting[$key])){ $res = $setting[$key]; } return $res; } // Fetch SEO settings from the database $seoSettings = $con->query("SELECT * FROM seo_settings")->fetch_assoc(); // Define default values in case settings are not found $webTitle = isset($seoSettings['web_title']) ? $seoSettings['web_title'] : 'Website'; $metaTitle = isset($seoSettings['meta_title']) ? $seoSettings['meta_title'] : ''; $metaDescription = isset($seoSettings['meta_description']) ? $seoSettings['meta_description'] : ''; $metaKeywords = isset($seoSettings['meta_keywords']) ? $seoSettings['meta_keywords'] : ''; $metaAuthor = isset($seoSettings['meta_author']) ? $seoSettings['meta_author'] : ''; $metaOgTitle = isset($seoSettings['meta_og_title']) ? $seoSettings['meta_og_title'] : ''; $metaOgDescription = isset($seoSettings['meta_og_description']) ? $seoSettings['meta_og_description'] : ''; ?> <?=$webTitle?>