PHP Variables from HTML-forms

Keeping the state

A standard "trick" is to pass a variable in the generated links:
    ...
    <a href="edit_person_info.php?pid=27">Henrik Hulgaard</a>
    ...
In the edit_person_info.php script, there will typically be a form with the information for the person with id 27. When the form is submitted, the update-script needs to know the id. This is done by storing the id in a hidden field in the form:
    ...
    <input type=hidden name=pid value=<? echo $pid ?>>
    ...