0
I have a login page that when the user logs in is redirected to a page called Minhaconta.php
containing the following code:
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><?php echo $_SESSION['nome']; ?><span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="MinhacontaPt-BR.php">👦 Perfil</a></li>
<li><a href="../Conexao/sair.php" class="fa fa-sign-out"> Sair</a></li>
</ul>
I can take his name and print it on this page, only when I go to the home page of my site, his name doesn’t print.
How can I do that?
When the user has logged in, in the initial part, appears "my account and quit" instead of "login and register". And, above, where my account is, appears the user name.
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">👦 Minha conta<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="CadastrarPT-BR.php">Registrar-se</a></li>
<li><a href="loginPT-BR.php">Entrar</a></li>
</ul>
</li>
I opened the session only on the page of Minhaconta.php
.
Kd your home page code?!
– LipESprY
<li class="dropdown"> <a class="dropdown-toggle" data-toggle="dropdown" role="button" Aria-haspopup="true" Aria-Expanded="false">👦 My account<span class="Caret"></span></a> <ul class="dropdown-menu"> <li><a href="Register BR.php">Register</a></li> <li><a href="loginPT-BR.php">Login</a></li> </ul> </li>
– Pedro Lukas
@Pedrolukas Click on [Edit] and post your code.
– Valdeir Psr
There are more codes, I just sent this part because this is where I want it when the user is logged in and the name of it appears and instead of registering and logging in, my account appears and exit.
– Pedro Lukas
Peter, think that to help you, we need as little as possible to reproduce your problem. You explained it well, but we have no way of guessing what your code is like as a whole. You can [Edit] your question and add the code relating to it.
– LipESprY
Sorry, I already sent the code there, see if you can understand better.
– Pedro Lukas
Still a little code. It will only generate more questions. Want to see?! Remember to log in to your homepage:
session_start()
?!– LipESprY
I mean, man it’s a lot of code bro, I don’t know how to send it around here and it will embolden you even more, yes, I opened the session only on the page of Minhaconta.php
– Pedro Lukas
Because it is a shop in this initial part, where there is Carousel, shop windows, etc. so if I send I think it will upset you and every time I try to send Uga k
– Pedro Lukas