我试图$username
从我的数据库中提取作为问候语。如何在 else 语句中输出变量?
变量用户名等于以下内容:
$username = htmlentities($_SESSION['user']['username'], ENT_QUOTES, 'UTF-8');
<?php
if($_GET["p"] == 'login') {
echo "";
} else {
echo "<div class='row'><div class='logo'><img style='margin-left: -21px;' src='http://localhost/ncms/images/logo.png' /></div><p class='panel radius topinfo'>Welcome . $username .</p>";
}?>