with this
$submit= $_POST['submit'];
$submit
is always set
maybe you could try
if (isset($_POST['Submit']))
and for debugging purpose you could try to var_dump $email
, $password
and $user
and check if maybe they are really empty when you post your form once or twice