-3
GOOD AFTERNOON GUYS
I am developing a website for a client and he wants to put a locator (search), in case put the name of the person and appear her burial place.
only that I made the php code and the database, but when I do the test, appears the blank result.
appears like this to me:
Cemiterio Municipal Parque Águas Lindas
Localizador de Jazigos
Resultado da Pesquisa:
Resultado da Pesquisa:
Resultado da Pesquisa:
Resultado da Pesquisa:
Resultado da Pesquisa:
and in case it was to appear like this:
Cemiterio Municipal Parque Águas Lindas
Localizador de Jazigos
Resultado da Pesquisa:maria claudia
Resultado da Pesquisa:maria cunha
Resultado da Pesquisa:maria lina
Resultado da Pesquisa:maria da luz
Resultado da Pesquisa:maria costa
the form code and the one I made:
<h1><center>Cemiterio Municipal Parque Águas Lindas</center></h1>
<h1><center>Localizador de Jazigos</center></h1>
<form method="POST" action="pesquisar.php">
<center> Pesquisar:<input type="text" name="pesquisar" placeholder="Nome do Falecido">
<input type="submit" value="ENVIAR"></center>
</form>
and the search code and this:
<h1><center>Cemiterio Municipal Parque Águas Lindas</center></h1>
<h1><center>Localizador de Jazigos</center></h1>
<?php
$servidor = "localhost";
$usuario = "root";
$senha = "EU NAO POSTEI A SENHA";
$database = "cemiterio";
//Criar a conexao
$conn = mysqli_connect($servidor, $usuario, $senha, $database);
$pesquisar = $_POST['pesquisar'];
$sql = "SELECT * FROM `jazigos` WHERE `NOME` LIKE '%$pesquisar%' LIMIT 5";
$resultado_cemiterio = mysqli_query ($conn,$sql);
while($rows_sql = mysqli_fetch_array($resultado_cemiterio)){
echo "Resultado da Pesquisa:" ."<br>";
}
?>
I REALLY NEED HELP WITH THIS PROJECT
And taking advantage, I need the result to present all the information of the row of the searched name ( the table has 8 columns) type search "maria lima" there appears so:
mome :maria lina Data de nascimento: 10/10/190 idade: 80 anos
Data de falecimento: 01/10/2018 Quadra: 03 Jazigo: 1250 Gaveta: 03
I don’t know what else to do, I did a lot of research, but I couldn’t find a solution
thanks for your attention and collaboration.
Put the code on so we can look, or it’ll be impossible to help you.
– William
You just want to do a simple search for a text typed in the form.
– Sam
'echo "Search Result:" ." <br>";' you have a logic problem here, there should be something like:
echo "Resultado da Pesquisa:" . $rows_sql['col1'] . "<br>"
– Alvaro Alves