Jump to content

Recommended Posts

Hi guys, i need your help to find the problem. My dropdown is not working, i can only make it work on the main page.

 

I think it will be easier to find the error if you have the pages so i will attack the main and one of the many that are not working.

 

There's an image: 

 

af5f1veu72uxt8ngxs5d.png

 

what's not working is where it say's "miguel". It's suppost to be an profile dropdown:

 

miguel = user logged, and in the dropdown it show to change settings (password, email...)

 

Main page:

inicio.php

 

Page not working:  

categoria.php

Link to comment
https://forums.phpfreaks.com/topic/296986-dropdown-not-working/
Share on other sites

Please use the proper forum tags to post the RELEVANT code here for us to view. Many of us don't go to other sites for fear of the risks.

 

Show us the html form for the dropdown and the php code that receives it, validates it and where the failure occurs.

 

Have you done any debugging to see what you are getting from your form yet?

Hi again,

there's the dropdown:

 

I have it on a page named menuTop.php

<li class="dropdown">
<a href="mensagensEnviadas.php"> <i class="fa fa-inbox"> </i> <?php echo "Mensagem" ?></a>
</li>
		
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-user"></i> <?php echo $user2; ?><b class="caret"></b></a>
<ul class="dropdown-menu">
<li>
<a href="perfilAdmin.php"><i class="fa fa-fw fa-user"></i> Perfil</a>
</li>
<li>
<a href="logout.php"><i class="fa fa-fw fa-power-off"></i> Log Out</a>
</li>
</ul>

and then i call it on all other pages:

<div id="wrapper">
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">			

<?php
include("menuLateral.php");
include("menuTop.php");			
?>

and after i write all my content (only a few is showed there)

<div id="page-wrapper">
<div class="container-fluid">	
<div class="row">
<div class="col-lg-12">
<h1 class="page-header">
Criar/Alterar Categorias
</h1>
<div class="alert alert-info alert-dismissable">
<a href="categoria.php">Criar/Alterar</a>
|| 
<a href="categoriaLista.php">Lista de Categorias</a>
|| 
<a href="categoriaAtiva.php">Categorias Ativas</a>
|| 
<a href="categoriaInativa.php">Categorias Inativas </a>
</div>
</div>
Edited by magcr23

There's a better way to you see all the code,

 

page with menu (dropdown is there) http://justpaste.it/lxgz

 

page where it's not working http://justpaste.it/lxh1

 

justpaste.it it's a website to share text, so my advise is to you copy the text to notepad++ or something like that for a better read

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.