Greetings,
I have a database with a table of purchase requisitions. In my html there is a panel where the number of purchase requisitions registered will be displayed.
I was able to SELECT right and print the results on a blank page.
But the goal is to print the result inside the request panel that already exists in an HTML page.
How to do this?
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="_css/estilo.css"/>
<title>MPparts - seu mercado de peças</title>
</head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script><scriptsrc="jquery.big-slide.js"></script>
<script>
$(document).ready(function() {
$('.menu-link').bigSlide();
});
</script>
<body>
<div id="interface">
<section id="menulateral">
<header id="cabecalhomenu">
<figure class="foto-usuario" >
<img src="_imagens/fotousuario.png">
<figcaption>
</figcaption>
</figure>
</header>
<nav id="menu" class="panel" role="navigation">
<ul>
<li><a href="incluir_requisicao.php">Nova requisição</a></li>
<li><a href="teste1.html">The Ballad of El Goodo</a></li>
<li><a href="#">Thirteen</a></li>
<li><a href="#">September Gurls</a></li>
<li><a href="logout.php">logout</a></li>
</ul>
</nav>
</section>
<section id="painelusuario">
<header id="cabecalhopainel">
<table id="tabelaindicadores" cellpadding="0px" cellspacing="50px">
<tr>
<td class="indicadorpainel" id="painel_requisicoes">Requisições<br>x </td>
<td class="indicadorpainel" id="painel_cotacoes">Cotações</td>
<td class="indicadorpainel" id="painel_transito">Em Transito </td>
<td class="indicadorpainel" id="painel_recebimento">Recebimento</td>
</tr>
</table>
</header>
<div id="areadetrabalho">
<header id="cabecalhoareadetrabalho">
teste
</header>
<IFRAME name= areadetrabalhoframe src="novarequisicao.html" frameBorder=0 width=100% height=100% scrolling=auto></IFRAME>
</div>
</section>
</div>
<?php
include ('conexao.php');
$listarequisicoes=mysqli_query($conexao,"select id_requisicao,
count(id_requisicao) from tb_requisicoes group by id_requisicao having
count(id_requisicao)>0 ") or die("erro");//lista todas as requisicoes cadastradas no banco de dados
$linhas= mysqli_num_rows($listarequisicoes);//conta requisicoes
if ($linhas==''){
echo 'nenhum registro';
}
else{
echo $linhas;
}