Create a HTML form that accept the user name and display the name using php


PHP is a server scripting language, and It is a powerful tool for making interactive and dynamic Web-pages. I have used WampServer 2.2 for following excercise..

HP 15 Core i3 7th gen Laptop(4GB, 1TB HDD, Windows 10) | Rs. 31,490

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>PHP Excercise</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  6. </head>
  7. <body>
  8. <form method='POST'>
  9. <h2>Please input your name:</h2>
  10. <input type="text" name="name">
  11. <input type="submit" value="Submit Name">
  12. </form>
  13. <?php
  14. //Retrieve name from query string and store to a local variable
  15. $name = $_POST['name'];
  16. echo "<h3> Hello $name </h3>";
  17. ?>
  18. </body>
  19. </html>


python language


Related Topics

Popular Posts