[Resolvido] mostrar nome de usuario
Ola, eu queria saber como faço para mostrar o nome de usuario tipo Bem vindo (a) Fulaninho um exemplo em print é o do forum olha:
/applications/core/interface/imageproxy/imageproxy.php?img=http://img256.imageshack.us/img256/6601/vinnynynynynynyt.png&key=97568e6fb0a07e473d6c7adea1ba6185798f2f6f2e8a2b06cbdbec8f74a211a8" alt="vinnynynynynynyt.png" />
vou colocar o painel.php (onde eu quero mostrar o nome): obs: eu só consegui fazer ele mostrar o username o usuario eu queria fazer ele mostrar o nome. ahhh e o nome da tebela é usuario nela tem id, nome(oq eu quero mostrar), usuario, senha e data.
<?php
if (!isset($_SESSION)) {
session_start();
}
$MM_authorizedUsers = "";
$MM_donotCheckaccess = "true";
// *** Restrict Access To Page: Grant or deny access to this page
function isAuthorized($strUsers, $strGroups, $UserName, $UserGroup) {
// For security, start by assuming the visitor is NOT authorized.
$isValid = False;
// When a visitor has logged into this site, the Session variable MM_Username set equal to their username.
// Therefore, we know that a user is NOT logged in if that Session variable is blank.
if (!empty($UserName)) {
// Besides being logged in, you may restrict access to only certain users based on an ID established when they login.
// Parse the strings into arrays.
$arrUsers = Explode(",", $strUsers);
$arrGroups = Explode(",", $strGroups);
if (in_array($UserName, $arrUsers)) {
$isValid = true;
}
// Or, you may restrict access to only certain users based on their username.
if (in_array($UserGroup, $arrGroups)) {
$isValid = true;
}
if (($strUsers == "") && true) {
$isValid = true;
}
}
return $isValid;
}
$MM_restrictGoTo = "index.php";
if (!((isset($_SESSION['MM_Username'])) && (isAuthorized("",$MM_authorizedUsers, $_SESSION['MM_Username'], $_SESSION['MM_UserGroup'])))) {
$MM_qsChar = "?";
$MM_referrer = $_SERVER['PHP_SELF'];
if (strpos($MM_restrictGoTo, "?")) $MM_qsChar = "&";
if (isset($_SERVER['QUERY_STRING']) && strlen($_SERVER['QUERY_STRING']) > 0)
$MM_referrer .= "?" . $_SERVER['QUERY_STRING'];
$MM_restrictGoTo = $MM_restrictGoTo. $MM_qsChar . "accesscheck=" . urlencode($MM_referrer);
header("Location: ". $MM_restrictGoTo);
exit;
}
?>
<link href="estilos.css" rel="stylesheet" type="text/css">
<div id="painel">
Seja bem vindo ao seu painel de usúario! Bem vindo(a)<?php echo $_SESSION['MM_Username'] ?>
<p><a href="deslogar.php">Deslogar</a></p>
</div>
ahhhh mais uma coisa se possivel queria mostrar assim para o usuario não logado: faça login | cadastrece < dai ia pra uma pagina de cadastro e dai quando tivesse logado aparecece tipo bem vindo (a) fulano | painel
só isso brigadão
Discussão (11)
Carregando comentários...