How to solve Fatal error: Call to undefined function Account () in

0

In my case I have this function:

in the Home file well at the beginning I imported here:

    <?php

      require_once("session.php");

      require_once("class_usuario.php");
      $auth_user = new USER();


      $user_id = $_SESSION['user_session'];

      $stmt = $auth_user->runQuery("SELECT * FROM N00_Usuario WHERE idUsuario=:user_id");
      $stmt->execute(array(":user_id"=>$user_id));

      $userRow=$stmt->fetch(PDO::FETCH_ASSOC);

    ?>

    e no arquivo Home importei a classe que está dentro do arquivo Class_usuario:
    <?php

      require_once("session.php");

      require_once("class_usuario.php");
      $auth_user = new USER();


      $user_id = $_SESSION['user_session'];

      $stmt = $auth_user->runQuery("SELECT * FROM N00_Usuario WHERE idUsuario=:user_id");
      $stmt->execute(array(":user_id"=>$user_id));

      $userRow=$stmt->fetch(PDO::FETCH_ASSOC);

    ?>

<div class="box bg-primary">
                  <i class="fa fa-eye"></i>
                  <?php 

                  try{
                    $a= ContaUsuario($connection) ;
                  }

                catch(PDOException $e) {
    echo "Error: " . $e->getMessage();
}
                  ?>
                  <h3><?php echo $a;?></h3>
                  <p class="lead">Page views</p>
                </div>
              </div>

What's wrong? Anyone have an idea?

    
asked by anonymous 15.11.2017 / 19:59

1 answer

1

Use your class and call the method.

try{
      $result =  $auth_user->ContaUsuario($connection);
      <h3><?php echo $result;?></h3>
 }
    
15.11.2017 / 20:25