My custom Form submissions works only in edit mode

Permalink 1 user found helpful
Hello i make custom form and this is my code:

view.php
<?php
//--- początek formularza ---
if(empty($_POST['submit'])) {
?>
<table>
<form action="" method="post">
<tr>
  <td>Imię i Nazwisko:</td>
  <td><input type="text" name="formName"/></td>
</tr>
<tr>
  <td>E-Mail:</td>
  <td><input type="text" name="formEmail"/></td>
</tr>
<tr>


And the submit button only reacts at the edit mode :/. I want it to work on NO edit mode, what im doing wrong ?

polkasa