How to develope form in php - php form example

PHP Form

/ins>

PHP Form Example

PHP form is used to take input from users. in PHP if you want to take input from keyboard and display the output according to input, in that case you have to use html form.
html form’s have a property : form method in which you have to set either get or post method.

To illustrate, consider the following  Web form(choose.php)

which asks you to select a brand of automobile and enter your desired color.

HTML Form

Save it as Choose.php

PHP Script

Output
Your blue Porshe 911 is ready. safe driving!
Select your car
Color

In the given above example:
First create a static page using HTML . Form first part is a drop down box from where user has to select the option, 2nd part is a text box in which user enter the color , after entered the value user click on button to display the output.
output displays lik Your blue Porshe 911 is ready. safe driving!