We have created a full form. Only one problem—if you open this web browser and press Submit Query, nothing happens! This is where PHP comes in. Before adding PHP, take a look at the source code for the web page we just created:
<title>A Sample Form</title> </head> <body> <h1>A Sample Form</h1> <br /> <form action="" method="post"> Name: <input type="text" name="fullname" /> Address: <input type="text" name="address" /><br /><br /> Comments: <textarea name="comments" cols="40" rows="2"></textarea><br /><br /> <input type="submit" name="submitbutton" /> <input type="reset" name="resetbutton" /> </form> </body> </html>
How does the form know to which page to send the data? It is defined in the action attribute of the <form> ...