Web Forms in PHP
HTML and PHP code is simple to embed into single document which makes easy to design static(HTML) and dynamic(PHP) pages together. A PHP interpreter will ignore everything outside PHP tags i.e. plain text/HTML code.
Plain text/HTML code is interpreted by the browser. By default characters like new-line(\n) , space(\s) are generally ignored by the PHP interpreter when printing on to the web page. These generic characters can be replaced with corresponding HTML tags
First PHP program
# Source Code <html> <head> <title> My PHP Page </title> </head> <body> <?php echo 'My First PHP Script'; ?> </body> </html> #Output My First PHP Script
Working with forms
<?php $_GET['Pname'] $_POST['Pname'] $_REQUEST['Pname'] ?>
<html> <body> <?php echo 'CONGRATULATIONS, Our new product.$_GET["Pname"].‘ is launched with a price of Rs.'.$_GET["Price"] ?> </body> </html>