I explain myself because the title might be a bit long and I wanted to simplify it.
I have a index.php page, it has a table, where in a tr
, td
( height
and width
already established) has a include ('/funciones/cargar_entrada.php')
, so The content of this include will be displayed in est tr
, td
.
The function carga_entrada.php , connects to a BBDD and retrieves the last entry (Example: entrada1.html ). I have tried to show entrada1.html
testing with;
echo "< a href='/../entradas/entrada1.html'>< /a>";
<script type="text/javascript">
location.href='/../entradas/entrada1.html';
</script>
So far everything is fine. The fact is that it does not show the content of entrada.1html
in cargar_entrada.php
...
Code of upload_input.php
$ server=""; $ user=""; $ pass=""; $ bbdd="";
$ connection = mysqli_connect ($ server, $ user, $ pass, $ bbdd) or die ("Error 505 NOT FOUND");
$ sql="SELECT * FROM entries ORDER BY id DESC LIMIT 1"; $ table = mysqli_query ($ connection, $ sql);
while ($ row = mysqli_fetch_object ($ table)) {$ id = $ row-> id; }
header ('Location: ../ entries / entry'. $ id. '. html');
I know it's very basic but it works correctly
Edit: In the end I opted for the following.
In index.php I have created an iframe with src = upload_entry.php, and this with the code that I have put above, loads the last entry correctly.
Topic solved, thanks for the help!