I hope I don't get flamed for this, cause I figured this might be the forum to post this in. Anyways, I'm starting to learn php and I got this code I was testing :
<body>
<h1>Hi User</h1>
<?php
if (empty($userName)) {
print "
<form method=\"post\" action=\"one page form.php\">
Please enter your name :
<input type = \"text\"
name = \"userName\"><br>
<input type = \"submit\">
</form>";}
else
{
$userName = $_REQUEST["userName"];
print "<h3>Hi there, $userName!</h3>";};
?>
</body>
Now as you can see, the attempt here is to get a form value on the same page with that empty function. So with that being said, any tips or pieces of advice one could offer me?