How to print input with php code
<p>I just start learning php and html and I wanted to make something that gets input and print out the output with php code. However, with the code I have, it lets me input, but not printing anything when I click submit. Why?</p>

<pre><code>&lt;html&gt;
&lt;head&gt;&lt;title&gt;Noob&lt;/title&gt;&lt;/head&gt;
&lt;body&gt;
&lt;form action="" method="post"&gt;
&lt;input type="text" name="username" value="" /&gt;
&lt;input type="submit" name="submit value="Submit" /&gt;
&lt;/form&gt;

&lt;?php
 if (isset($_POST['submit'])) { //to check if the form was submitted
 $username= $_POST['username'];
 echo $username;
}
?&gt;

&lt;/body&gt;
&lt;html&gt;
</code></pre>