May 2003
Intermediate to advanced
592 pages
14h 28m
English
In the examples so far, all of the data received in the handle_form.php script came from what the user entered in the form. There are, however, two different ways you can pass a PHP script variables and values, 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 $name will have a value of Brian in the handling PHP script.
The second method is to append a value to the handling PHP script’s URL:
www.dmcinsights.com/page.php?name=Brian
This technique emulates the get method of an HTML form and can be used in lieu of or as well as an HTML form.
Read now
Unlock full access