0
I’m having a problem trying to show nproposta
, information on the application and dataregistada
. Thanks in advance for any help. Thank you
<?php
$ligaBD=mysqli_connect("localhost","root","","pap");
If(!$ligaBD) {
printf("Ligação falhou: %\n",mysqli_connect_errno());
exit();
}
?>
<section id="main">
<div class="container">
<div class="row">
<div class="col-md-9">
<!-- Latest Users -->
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">titulo</h3>
</div>
<div class="panel-body">
<div class="row">
<div class="col-md-12">
<input class="form-control" type="text" placeholder="Pesquisar Nº de Proposta">
</div>
</div>
<table class="table table-striped table-hover">
<tr>
<th>Nº da Proposta</th>
<th>Pedidos</th>
<th>Data</th>
</tr>
<?php
$selectProp = "SELECT * FROM propostas,registo
WHERE propostas.nproposta=registo.nproposta AND propostas.nproposta='$nproposta'";
$resultado = mysqli_query($ligaBD, $selectProp);
if (mysqli_num_rows($resultado) > 0) {
// output data of each row
while($row = mysqli_fetch_assoc($resultado)) {
?>
<tr>
<td>
<?php
echo $row["nproposta"];
?>
</td>
<td><p><a href=".\informaçãopedido.php?nproposta=<?php echo $row["nproposta"];?>">Pedido</a></p></td>
<td>
<?php
echo $row["dataregistada"];
?>
</td>
</tr>
<?php
}}
mysqli_close($ligaBD);
?>
</table>
<a class="btn btn-default" href="./registardata.html">Registar Aquisição/Requisição</a>
</div>
</div>
</div>
</div>
</div>
</section>
you have some variable called $nproposta off that column?
– Will Knippelberg
The error is because you are calling a variable in your query that has not been defined.
– viana