0
Greetings,
I have a database with a purchase order chart. In my html there is a panel where the number of registered purchase requests will be displayed.
I managed to make the 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>
<script src="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;
}
I understand that you want to show this result on the page somewhere specific, but where is this place? No
iframe
? Another thing is the TAG used in the question, you marked it as java, but I don’t see any java in your code, it wouldn’t be Javascript?– Gabriel Queiroz Schicora
Thank you so much for your attention. The place would be in TD q has id= painel_requisicoes and java was wrong msm.
– Rodrigo Maniezzo
Welcome Rodrigo Maniezzo, if any answer solves your problem be sure to mark it as accepted. See how in https://i.stack.Imgur.com/jx7Ts.png and why in https://pt.meta.stackoverflow.com/questions/1078/como-e-por-que-aceitar-uma-resposta/1079#1079 If you would like to tour the site visit https://answall.com/tour
– user60252