Error with PHP function

0
Hello, I am developing this system for study purposes and whenever I try to do some operation like register, edit or delete I get the error message: "Fatal error: Call to undefined function logged_user () in / opt / lampp / htdocs / projects / estudandophp / menu_administrator.php on line 28 "but the operation is complete. From what I researched it is as if the class where the function is defined did not exist but I think that is not the case. What am I doing wrong? Below the screens to give a sense of what I'm doing:

Here is the source code for the application: GitHub

    
asked by anonymous 07.06.2016 / 03:37

2 answers

0

Just add the security.php file at the beginning of the admin_php.php file for example:

<?php require_once 'seguranca.php'; ?>
    
07.06.2016 / 08:47
0

See:

<?php include_once 'segurança.php';?>
<nav id="barra_navegacao"class="navbar navbar-inverse navbar navbar-fixed-top">
            <div class="container-fluid">
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
                        <span class="sr-only">Toggle navigation</span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                    <a class="navbar-brand" href="menu.php"><font style="color: #337ab7"><b>Sistema X</b></font></a>
                </div>
                <div id="navbar" class="navbar-collapse collapse">
                    
                    <ul class="nav navbar-nav">
                        <li class="dropdown">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><small>GERENCIAMENTO</small><span class="caret"></span></a>
                            <ul class="dropdown-menu">
<!--                            <li class="dropdown-header">Teste</li>
                                <li role="separator" class="divider"></li>-->

                                <li><a href="menu.php?link=2"><small><span class="glyphicon glyphicon-education"></span> ALUNO</small></a></li>

                            </ul>
                        </li>
                    </ul>                    
                    <ul class="nav navbar-nav navbar-right">
                        <li class="dropdown">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><?php usuario_logado();?><span class="caret"></span></a>
                            <ul class="dropdown-menu">
                                <li><a href="sair.php"><span class="glyphicon glyphicon-log-out"></span> <small>SAIR</small></a></li>
                            </ul>
                        </li>
                    </ul>
                </div>
            </div>
        </nav>
    
07.06.2016 / 04:16