|
|
|
|
|
|
|
|
PHP Basics
P.G. Daly 2/8/2006 There are a few key points worth making about this. First, whenever a form is submitted and it uses the POST method, PHP stores it in a special container variable called $_POST. You can retrieve the information by storing it in a variable (in this case $field1) by referring to $_POST ['the_name_you_gave_the_field_on_your_form']. Whether you have one form field or a hundred, the retrieval is the same. If you used the GET method, the retrieval is similar using the $_GET variable. As you can see, the remainder of the script simply echoes back the contents of the variable onto the Web page. If you want a quick and dirty path to getting your forms up and running, there are a host of free and low-cost PHP scripts for you to use to e-mail your form results and/or store them in a database. Some of the larger collections can be found at The PHP Resource Index and Hotscripts. Now you have the very basics. In fact, you are well on your way to understanding and being able to tweak other people's scripts for your own use. As with any new language experimentation and trial and error is the best teacher. Once you think you've got it down, take a look at Intranet Journal's tutorial on building a content management system with PHP.
Go to page: 1 2
| |||||||||||||||||||||||||||||||||||||||||||
Intranet Journal's Tutorials |
|
Managing Editor |