Rieccomi

Modificato in questo modo, non mi segnala nessun errore, ma continua a non registrare nulla nel DB

Codice PHP:
<?
require_once("../settings.inc");
function 
insert($field,$pollid){
     
mysql_query ("insert into poll_alternatives (poll_id,alternative,votes) values ('$pollid','$field','0')");
     echo 
"insert into poll_alternatives (poll_id,alternative,votes) values ('$pollid','$field','0')
"
;
}

if (empty(
$submit)){
  
?>
     <font face="Verdana" size="2">
     <form method="post"  submit="yes">
     [b]Question:[/b]

     <input type="text" name="question">


     [b]Alternative 1:[/b] <input type="text" name="alt">

     [b]Alternative 2:[/b] <input type="text" name="alt2">

     [b]Alternative 3:[/b] <input type="text" name="alt3">

     [b]Alternative 4:[/b] <input type="text" name="alt4">

     [b]Alternative 5:[/b] <input type="text" name="alt5">

     [b]Alternative 6:[/b] <input type="text" name="alt6">

     [b]Alternative 7:[/b] <input type="text" name="alt7">

     [b]Alternative 8:[/b] <input type="text" name="alt8">


     <input type="submit" name="submit" value="Submit">
     </FORM></font>
<?
}
else{
 
$poll mysql_connect("$db_host""$db_username""$db_password")
        or die (
"Could not connect");
 
mysql_select_db ("cerebus")
        or die (
"Could not select database");
 
$checkforpoll=mysql_query("select * from polls");
 if (
mysql_num_rows($checkforpoll)==0){
    
$date date("Y-m-d");
    
mysql_query ("insert into polls (question, active,dateactive,votes) values ('$question','yes',$date,'0')");
    echo 
"insert into polls (question, active,dateactive,votes) values ('$question','yes',$date,'0')

"
;
 }
 else {
      
mysql_query ("insert into polls (question, active,votes) values ('$question','no','0')");
      echo 
"insert into polls (question, active,votes) values ('$question','no','0')

"
;
 }
 
$getpollid mysql_query("select id from polls where question='$question' order by id desc limit 1");
 
$getitid mysql_fetch_row($getpollid);
 
$pollid $getitid[0];
 if(
$_POST['alt']){ insert($_POST['alt'],$pollid);}
 if(
$_POST['alt2']){ insert($_POST['alt2'],pollid); }
 if(
$_POST['alt3']){ insert($_POST['alt3'],pollid); }
 if(
$_POST['alt4']){ insert($_POST['alt4'],pollid); }
 if(
$_POST['alt5']){ insert($_POST['alt5'],pollid); }
 if(
$_POST['alt6']){ insert($_POST['alt6'],pollid); }
 if(
$_POST['alt7']){ insert($_POST['alt7'],pollid); }
 if(
$_POST['alt8']){ insert($_POST['alt8'],pollid); }

 
mysql_close($poll);
}
?>