I found this topic:
How to get input field value using PHP
But it didn't help to me. I didn't have any form just this:
echo '<input required type = "number" name = "db" value="1" /><br>';
And I want this input type value store in a variable if I hit a link it should send this checkbox data as well and open the href with these values.
Like ?buy=#product_id&quantity=#insert_value_here
Now it sends only the product_id and the quantity value is empty.