In the examples so far, all of the data received in the PHP script came from what the user entered in a form. There are, however, two different ways you can pass variables and values to a PHP script, both worth knowing.
The first method is to make use of HTML’s hidden input type:
<input type="hidden" name="name" → value="Brian" />
As long as this code is anywhere between the form tags, the variable $_POST['name'] will have a value of Brian in the handling PHP script (assuming that the form uses the POST method). This technique will be demonstrated shortly.
The second method is to append a value to the PHP script’s URL:
This technique emulates the GET method of an HTML ...