You should consider printing the $sql variable, not just write it. Also, because print() is a PHP function, you must have it enclosed within the PHP <?php / ?> tags. Your code should be like this:
Gracias por la respuesta pero no es lo que busco con el PRINT, yo quiero desplegar algo en el centro de la pantalla, voy a amplear el codigo a ver si me explico.
Por alguna razon no pude poner el codigo original y le agregue el caracter # para poder ponerlo porque me borraba parte de el.
Obviamente no va el caracter #
Lo que necesito es que en la tabla repita la palabra hola.
Why are you adding <? / ?> tags? You don’t need them.
Also, I see you have removed the </th> …
while($row < 10)
{
?>
<tr>
<td> <? =$sql ?> </td>
</tr>
<?php
$row=$row+1;
}
This piece of code is not going to work because:
000webhost no longer supports small enclosing tags <? / ?>. There are ways to add support for them however I do not recommend it.
</tr> and all the other tags must be outputted. PHP works separately from HTML, and only within <?php / ?> tags.
Please follow the code I have provided earlier because that’s the correct one. Also, I strongly advise you to read some documentation about HTML and PHP(BitDegree link), how they work together, but most important, what is PHP(PHP.NET link) and how it works.
De nuevo yo, estoy algo decepcionado de mi trabajo. Aprendí solo y si, tal vez revolví conceptos.
Aprendí a prueba y error codificando en www.000webhost y fui avanzando, lo que hice involucrando MYSQL , PHP y HTML para mi era un logro porque de alguna manera funcionaba todo antes del 1° de mayo. A raíz del cambio y usar otra cuenta en el nuevo esquema dejo de funcionar.
Realmente no se que hacer pues para mi prácticamente es cambiar casi todo, solo estoy desogandome .
No entiendo bien tu pregunta, si te refieres al anterior mensaje, esta relacionado con todo lo anterior en este mismo.
La duda principal que tengo es porque si todo funcionaba en mi cuenta jagonzalez.54 antes del 1° de mayo y al llegar la fecha salio un mensaje que hiciéramos una nueva cuenta jagdesarrollos subí los archivos, bases de datos y no funciona nada.
Tu compañero NGiNX que bien me ha asesorado y se lo agradezco me siguiere cambios que para mi es volver a empezar prácticamente modificando codigo
La pregunta principal es : Porque antes funcionaba como lo tenia y ahora no ?
Entiendo que tenia conceptos equivocados, esta bien, pero funcionaba.
La pregunta principal es : Porque antes funcionaba como lo tenia y ahora no ?
We have changed a few things on the new servers. All for compatibility, security and performance issues.
It was a good idea to tell us that your website was migrated. I would’ve suggested you to change the PHP version as well: 000webhost cPanel > Settings > General > Change PHP version > 5.6
En la cuenta anterior jagonzalez.54 que todavía puedo entrar dice que esta el PHP 5.2.*
En la nueva cuenta jagdesarrollos en la configuración de PHP dice ahorita PHP 5.6 y no funciona casi nada por no decir nada y aun cuando lo cambie a PHP 5.2 que la tienen como opción tampoco funciona.
It depends on how you have coded the website. I also see that you have used short PHP tags <? / ?> which I do not recommend because they are deprecated. You can still add support for them though… Please follow this tutorial to do so:
Also, have you been using SSI in your documents/files?
When I try to login in your website I get
ProxySQL Error: Access denied for user ‘’@‘2a02:4780:bad:f00d::7’ (using password: NO)
This means you must update the databases credentials in your config files as well. Please make sure they are the same as the ones from 000webhost cPanel > Manage databases