when the user registers their product go straight to your dashboard (php)

Asked

Viewed 45 times

0

I have a system and in it when the registered user goes straight to the advertising page, but now he does not list the product of this user in his panel

<?php
include_once ("../Model/Produto.php");

if (isset($_REQUEST)){
    $action = $_REQUEST['action'];
} else {
    $action = "";
}

$Produto = new Produto;

switch ($action){

    case 'listar':
        $listaProdutos = $Produto->listar();
        $listaProdutosComprar = $Produto->listarCompra();
        $listaProdutosDoacao = $Produto->listarDoacao();
        $listaProdutosCruzar = $Produto->listarCruzar();
        include_once '../View/listarProduto.php';
        include_once '..View/painel.php';
        break;
}
  • Doesn’t it list the product that has just been registered or all products? If it is the first option, it is likely that the model is getting the database data before properly registering.

  • Well first he registers at the bank and then we say that he makes a listing of all products as if they were advertisements.

  • are not missing the / there in the include before the break ..View/Painel.php, would not be ../View/Painel.php?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.