I want to build a marketplace(index.php) website where a user can click on a item and then a separate website will be open where there will be information about this item. This website will be the same for all items, but only some text and image will be different. My idea was to use php. So when I click an item, a info.php file will be called, and the corresponding html will be generated. The problem I am facing is how to transfer that product's id from the main site to info.php by clicking this item.
In index.php:
$id=""
How to give a value to var once this item is clicked(and info.php is called)?
In info.php:
include 'index.php';
echo $id;
And now I use var to retrieve information from the database. If there is a more efficient way to make this transition please let me know!