2
The select
was working normally on wamp, but when uploading the site to the server the information of some of the sites simply stopped coming.
The only part where the select
is working is the login of the administrative area, I have checked my connection file and all information matches the server, on select
the same.
Follow the code from one of the pages :
include 'conexao.php';
// Selecionando informações da tabela galeriafotos
$sql = "SELECT * FROM `galeriafotos` order by datacadastro DESC";
//Selecionando informações da tabela projetos
$sql2 = "SELECT * FROM `projetos` order by datacadastro DESC";
$resultado = mysqli_query($conexao, $sql);
$resultado2 = mysqli_query($conexao, $sql2);
And call them on the page through the following code:
<?php foreach($resultado as $linha) { ?>
<tr>
<td>
<?php echo $linha["titulo"]; ?>
</td>
<td>
<?php echo date('d/m/Y', strtotime($linha['datacadastro'])); ?>
</td>
<td>
<?php echo $linha["categoria"]; ?>
</td>
<?php } ?>
Please avoid long discussions in the comments; your talk was moved to the chat
– Maniero