If you want to transfer the PID when the form is submitted then you need a field for it within the form, e.g. a hidden field like this:
<input type="hidden" name="pid" value="<?php echo $row['pid']; ?>"/>
Then when you submit the form, it will be accessible as $_POST["pid"]
(just like the value from the dropdown is accessible as $_POST["quantity"]
).
This applies to any value - if you want it to be submitted with the form, then there needs to be a proper field for it within the form (or least associated with the form via the necessary attribute).
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…