03.3: How to grab user input from a web page

In this lesson we cover how to get info from a user. We will create a basic web form, learn about input boxes, and submit buttons. And we will get input from one page and display it on another.


https://youtu.be/Eon4DSg0YKc





<?php
# * get_name.php

echo "
          <form name=\"contact\" action=\"get_name2.php\" method=\"post\">
            <label for=\"name\">Name:</label><input type=\"text\" id=\"name\" name=\"name\"/>
            <input type=\"submit\" value=\"Submit\" class=\"login\" />
            </form>
";

?>





<?php
# * get_name2.php

$name = $_POST['name'];

echo "You enterted name: $name<BR>";

?>