Pessoal quero entender porque acontece isso,
utilizei este código;
<table class="table table-striped table-hover" id="dataTables-example">
<thead>
<tr>
<th>Name</th>
<th>Email </th>
<th>Senha</th>
<th></th>
</tr>
</thead>
<tbody>
<?php
include 'database.php';
$pdo = Database::connect();
$sql = 'SELECT * FROM users ORDER BY id DESC';
foreach ($pdo->query($sql) as $row) {
echo '<tr>';
echo '<td>'. $row('zname') . '</td>';
echo '<td>'. $row('email') . '</td>';
echo '<td>'. $row('password') . '</td>';
echo '<td width=100%>';
echo '</td>';
echo '</tr>';
}if ($row >= 1){
$sxURL="tem pedido.php";
echo ("<script>location.href='$sxURL'</script>");
}
else if ($row == 0){
$fxURL="não tem pedido.php";
echo ("<script>location.href='$fxURL'</script>");
}else {
$zxURL="Em análise.php";
echo ("<script>location.href='$zxURL'</script>");
}
Digamos que vai para pagina de condição ( >=1 ) “tem pedido.php” ok, porém fica dando refresh sem parar.
como resolver isso? o que tem de errado este código.