Step by Step Guide to create forms in PHP
Introduction
In the last part, I showed you how to use PHP to send e-mail messages using a script. In this part I will continue this and also show you how to use PHP and forms together to make your PHP scripts useful.
Setting Up Your Form
Setting up a form for use with a PHP script is exactly the same as normal in HTML. As this is a PHP tutorial I will not go into depth in how to write your form but I will show you three of the main pieces of code you must know:
Will display a text input box with Your Name written in it as default. The value section of this code is optional. The information defined by name will be the name of this text box and should be unique.
Will display a large scrolling text box with the text 'Please write your message here.' as default. Again, the name is defined and should be unique.
This will create a submit button for your form. You can change what it says on the button by changing the button's value.
All the elements for your form must be enclosed in the
Thursday, May 27, 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment