-1
Good morning, everyone.
I really need the help of vcs. I have a problem for days on an html page where I take 3 data to search the database. So far so good. I connect in the database, and I have the search return correctly via search.php, but, the data that is in search.php can not pass to html. The execution for php and appear on a blank page, not returning to the html page.
* code snippet in index.html: *
<select name="selsegmento" class="custom-select">
<option selected>Segmento</option>
<option value=""></option>
<option value="2">Restaurante</option>
<option value="3">Serviços Manuais</option>
</select>
outro select...
<button type="submit" id="Buscar">Pesquisar</button>
</form>
* snippet of the.php search code: *
Search data:
<?php
if (count($resultado) > 0){
?>
<table>
<tbody>
<tr>
<th> segmento </th>
<th> nome </th>
</tr>
<?php
foreach ($resultado as $res) {
?>
<tr>
<td><?=$res['seg_nome'];?></td>
<td><?=$res['nome_nome'];?></td>
</tr>
<?php }?>
</tbody>
</table>
<?php } else {?>
<h3> Dados não encontrados </h3>
Thanks for the help.
Can you post all your code? What would be this $result variable?
– Angelo Soares
Good morning, Angelo. I didn’t post any more because the code was so big. $Result is the result of sql, which has the lines with the data I have to put on the screen. So far that’s correct, so I haven’t put in this bit of code either.
– Nickbr
The braces on this island
<?php } else {?>
is being closed? access the page and click onver fonte da pagina
ve if you have any errors embedded at the end of the source code.– 13dev