In this tutorial, we will take a look at how to pass the value of a variable from a webpage to a PHP program. Essentially, there are two parts to this. The first part is collecting information from your website visitor and passing that information to the processing program. The second part is coding the processing program to “recognize” each variable and the information it carries. What happens to the information then depends on the purpose of the program. Let’s follow along with a couple example variables as they make their way from the webpage to a processing program called program.php. The easiest way to collect information from your visitors is to use an HTML form. Each piece of information that you wish to collect is assigned to a program variable and each variable is given a unique name. For our example, we will be asking the visitor is give us their first name and email address.
| ||||