通过添加 URL 和文件名来插入值

INSERT value by adding URL and file name

我想用网站 URL 和上传路径将值插入到我的单列中。但我真的不会那样做。在这里,我的 table 中有 2 列。我想将网站 URL 和上传路径插入到第二列 $website_logo。需要这样输出:https://website.com/uploads/image.png 下面提供了我的代码:

// insert new data to menu table
        $sitelink = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]";
        $sql_query = "INSERT INTO tbl_category (website_link, website_logo)
                        VALUES('$website_link', '$sitelink'/'$website_logo')";

$sitelink 将使用 HTTP 获取网站 URL。但这对我不起作用。我该怎么做?

考虑到 'tbl_category' 是 MySQL table 名称并且 $website_logo 持有值 'image.png':

$sitelink = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]";
$logo = $sitelink . '/uploads/' . $website_logo;
$sql_query = "INSERT INTO tbl_category (website_link, website_logo)                  
              VALUES('$sitelink', '$logo')";