Answer the question
In order to leave comments, you need to log in
How to place different content on one page?
In general, I'm completely new to the web and make the first site. I do for myself. Maybe, of course, I'm looking badly, but still. I want to make it so that on the same page to place a different file for download, and to determine which file using the id in the page url. To make it clear, here is an example. (Not advertising) https://s1.torrents-igruha.org/?do=download&id=8505 The page is the same, as I understand it, but if you go to download different games, the parameter changes ID. Initially, I thought it was just a matter of creating a separate file for each page, but if you really do it this way, then I think it will be better. If anyone knows, then you can just throw off the site with information for training.
Answer the question
In order to leave comments, you need to log in
Create a torrents table. It will contain name, url, id.
In the dock we write something like:
$do = $_GET["do"];
$id =$_GET["id"];
if ($do == "download"){
$cnnct = new mysqli("localhost, root, root, yourdb");
$url = $cnnct->query("SELECT url FROM torrents WHERE id = $id");
echo "Ваш торрент: ${url}";
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question