There is an area on my system where the user sees a list of products, by clicking on the product he can see his details. My question is how to make this details page. How do I get the specific code for a product so that the system knows that it is from this product that it has to search the database for its details?
I tried to do this (not finding the page):
MProjetos.php
<?php
$usuario=$_SESSION['email'];
require_once 'Classes/ProjetosVO.php';
require_once 'Classes/ProjetosDAO.php';
$objBDProjeto=new ProjetosDAO();
$objProjeto= new ProjetosVO();
$rsProjeto= $objBDProjeto->ListarProjetos("1");
$tblProjeto= mysqli_fetch_array($rsProjeto);
$mysqli = new mysqli('localhost', 'root', '', 'bdpi');
?>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script><linkrel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M" crossorigin="anonymous">
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js"integrity="sha384-b/U6ypiBEHpOf/4+1nzFpr53nxSS+GLCkfwBdFNTxtclqqenISfwAzpKaMNFNmj4" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js"integrity="sha384-h0AbiXch4ZDo7tp9hKZ4TsHbi047NrKGLO3SEJAg45jXxnGIfYzk4Si90RDIqNm1" crossorigin="anonymous"></script>
<script src="https://use.fontawesome.com/eb2dfeaa2c.js"></script><br><br><center><h1class="Titulo">Meus Projetos</h1></center>
<center>
<br>
<?php
include 'FormCadastraProjeto.php';
?>
<?php
while($tblProjeto= mysqli_fetch_array($rsProjeto)){
$query = "select cor_PROJETO from usuarios U, projetos P where email_USUARIO like '$usuario' and U.email_USUARIO=P.responsavel_PROJETO";
$resource= mysqli_query($mysqli,$query) or die(mysqli_error($mysqli));
$resultado = mysqli_fetch_array($resource);
$cor = $resultado['cor_PROJETO'];
?>
<a href="Projeto.php&codProjeto=<?=$tblProjeto['codigo_PROJETO'];?>" style="color: <?php echo $cor; ?>"><h1><i class="fa fa-folder" aria-hidden="true"></i></h1>
<?php
$projeto=$tblProjeto['nome_PROJETO'];
echo $projeto;
?>
</a>
<?php
}
?>
Project.php (where a href should take)
<?php
$usuario=$_SESSION['email'];
require_once 'Classes/ProjetosVO.php';
require_once 'Classes/ProjetosDAO.php';
require_once "Classes/BancoDAO.php";
$objBDpi = new BancoDAO();
$objBDpi->AbreConexao();
$mysqli = new mysqli('localhost', 'root', '', 'bdpi');
$codProjeto=$_GET['codProjeto'];
$sqlDetalhes= "Select * from projetos where codigo_PROJETO='$codProjeto'";//montando select
$rsDetalhes= mysqli_query($mysqli,$sqlDetalhes) or die (mysqli_error($mysqli));//
$tblDetalhes= mysqli_fetch_array($rsDetalhes);
?>
oi