thats because "submit" is not send,
only if you push the button.
you can fix this doing this:
<input type="hidden" value="1" name="submit">
or using an different variable like:
<?php
if($HTTP_POST_VARS['itemname'])
?>
in stead of:
<?php
if($HTTP_POST_VARS['submit'])
?>