For example, if in my mysql product table I add one with its respective name, image, ect... I want a page about that product to be created automatically with an html/php template that I obviously already have.
I mean, I can add a link to my product in mysql, which when I click on its preview (on my home page for example) will take me to a page with that link. The problem is that this will give me a 404 error because that page does not exist. The question is how to create it, so that all these products reach the same template that is prepared to receive the data of different products through php and HTML code
Is this possible to do? if so how? (you don't need to explain me with code).
Yes it can be done.
I will explain it with a simple code. Then this code has to be debugged, such as putting the database connection in a separate file and using it with includes etc.
The example is to show the mechanics.
2 files are created in one, you will have the list with the links of the articles or products that you want to see in detail, then a page is created where it will show the product detail.
The second file receives a parameter through $_GET for the url where the record to be displayed is indicated.
file listing.php
The second file tab_producto.php where the parameter is received by the url ($_GET) and looks for the specific record, then mounts it.
As is evident, you have to create your own query with the correct data from your table, here are an example.
Y
This code should be greatly improved for security issues, such as control of the received parameter. Optimization of the MVC code, but shows the working mechanism.