Why doesn't this php code work?

Why doesn’t this php code work?

http://testemg.epizy.com/x25infoola22.php

You should (or must) try this code:

<?php 
session_start();
include("includes/metatags.php"); 
include "/includes/conect.php";
?>
<html>
<head>
<title>MeuGibi.com - Info 2</title>
</head>
<body>
<?php
echo '<BR>';
echo '<h1><center>Ultimos Gibis Criados...</center></h1>';
echo '<BR><center><table align="center" border="1" cellspacing="0" cellpadding="0"><tr>';

               echo "<tr>";
               echo "<td>ID</td>";
               echo "<td>Data</td>";
               echo "<td>Hora</td>";
               echo "<td>Titulo</td>";
               echo "<td>Login/Usuario</td>";
               echo "<td>Visitas</td>";
               echo "<td>Descricao</td>";
               echo "<td>Quadros/Imagens</td>";
               echo "</tr>";

$Parte1 = "select id,data,titulo,login,visitas,hora,descricao from gibis order by id desc limit 100";
$result_query = mysqli_query($mysqli, $Parte1);
while ($row=mysqli_fetch_assoc($result_query))
              {
               echo "<tr>";
               echo "<td>" . $row['id'] . "</td>";
               echo "<td>" . $row['data'] . "</td>";
               echo "<td>" . $row['hora'] . "</td>";
               echo "<td>" . $row['titulo'] . "</td>";
               echo "<td>" . $row['login'] . "</td>";
               echo "<td>" . $row['visitas'] . "</td>";
               echo "<td>" . $row['descricao'] . "</td>";

$Parte2 = "select id,quadros,descricao from quadros where idref='" . $row['id'] . "' order by ordem";
$result_query2 = mysqli_query($mysqli, $Parte2);
while ($row2=mysqli_fetch_assoc($result_query2))
              {
               //echo "<td>" . $row2['quadros'] . "</td>";
               echo "<td><a href='gibi.php?id=" . $row['id'] . "' target='_blank'><img src=" . $row2['quadros'] . " width='90' height='51' border='0'></a></td>";
               echo "<td>" . $row2['descricao'] . "</td>";
               //<img src='" . $row2['quadros'] . "' width='90' border='0'></td>";
              };




               echo "</tr>";
              };
echo "</table></table>";

echo '<BR>';
echo '<h1><center>Ultimos Usuarios Criados...</h1>';
echo '<BR><center><table align="center" border="1" cellspacing="0" cellpadding="0"><tr>';

               echo "<tr>";
               echo "<td>ID</td>";
               echo "<td>Data</td>";
               echo "<td>Login/Usuario</td>";
               echo "</tr>";

$Parte1 = "select id,data,login from usuarios order by id desc limit 40";
$result_query = mysqli_query($mysqli, $Parte1);
while ($row=mysqli_fetch_assoc($result_query))
              {
               echo "<tr>";
               echo "<td>" . $row['id'] . "</td>";
               echo "<td>" . $row['data'] . "</td>";
               echo "<td>" . $row['login'] . "</td>";
              }

?>
</tr>
</tbody>
</table>
</center>
</body>
</html>

Edit: as @ergastolator1 said a where. you should not save it UTF-8 BOM or ANSI. you would remake this file by file manager editor one. And make sure the <?php and ?> doesn’t convert to <!--?php and ?-->

1 Like

Also, note that includes folder will return a 403 error while visiting it through a browser. Try to rename includes to inc, also remove the directory listing (aka making it secure) by adding this line on the .htaccess you would create on the inc folder:

Options -Indexes

and link the paths of the new configuration files on that file.

1 Like

I use Notepad++.

Same page:
http://testemg.epizy.com/x25infoola22.php

Sabe code, PHP ok in meugibi.com, but in epizy do not ok.

I copy includes files into PHP and do not work.

See other post, in epizy do not work PHP, in meugibi . com work!

Sorry my english, i from brazil!

Then on your subdomain try to set the PHP version to 5.6, wait a few minutes, and then back to 7.3, and wait a few minutes, and see if it works or not.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.