I am studying a newbie and trying to understand how html forms and php processing work.
This pair of examples happened:
HTML FORM:
<html>
<body>
<form action="hello-web.php" method="GET">
<label>Name:</label>
<input type="text" name="yourName" size="24">
<input type="submit">
</form>
</body>
</html>
PHP PROCESSOR:
<?php
$fname = $_GET["yourName"];
echo "Hello $fname!";
?>
EXIT SHOULD BE: Hi Entered / Example Name!
Question: When I try to change the variable "yourName" (on BOTH HTML and PHP files), for example, "typeName" , the name entered in the form does not appear.
In other words, the output becomes: Hello!
Is "yourName" a standard php or html variable? Could this be changed to what you want?
Better yet, how exactly are the form data handled?
, ( , , , :
HTML ( - typeName):
<html>
<body>
<form action="hello-web.php" method="GET">
<label>Name:</label>
<input type="text" name="typeName" size="24">
<input type="submit">
</form>
</body>
</html>
PHP PRCESSOR ( - typeName):
<html>
<body>
<?php
$fname = $_GET["typeName"];
echo "Hello $fname!";
?>
</body>
</html>