A few thing you could do:
- Make sure that the "action" attribute on your form leads to the correct destination.
- Try using $_REQUEST[] instead of $_POST, see if there is any change.
[Optional] Try including both a 'name' and an 'id' attribute e.g.
<input type="text" name="firstname" id="firstname">
If you are in a Linux environment, check that you have both Read/Write permissions to the file.
In addition, this link might also help.
EDIT:
You could also substitute
<code>if(isset($_POST['submit'])){</code>
with this:
<code>if($_SERVER['REQUEST_METHOD'] == "POST"){ </code>
This is always the best way of checking whether or not a form has been submitted