PHP with HTML Form
In this php tutorial we will learn how to write php server side code with html form to create a web page.
We already know that the html language is used to make a design of webpage.
we can design a webpage with html controls like button control, textbox control, radio button etc.
The html code design only the static web site. if we want make it dynamic then we need to do some server side programming.
Here we use php server side code with html page, we must use FORM tags for interact the page with users.
The basic html page with button control and textbox control like :
<html>
<head>
<title>My First HTML web page</title>
</head>
<body>
<FORM name="form1" action="" method="">
Name : <input type="text" name="name"><br>
Password : <input type="text" name="city"><br>
<input type="submit" name="Submit1" value="Login">
</FORM>
</body>
</html>
Now save above file with name firstexample.php in php script folder. here the firstexample.php is a name of our webpage.The page with two textboxes and a submit button control. when we run the firstexample.php page it would look like below screen.