<form action="/buy.php"> <input type="hidden" name="product_id" value="<?= $_GET['product_id'] ?>"> <button type="submit">Купить</button> </form>