Che significa questo errore???

questa è la linea

codice:
 if($errore == 1)
in poche parola, questa pagina alla prima visualizzazione contiene un form che invia le informazioni ad una pagina(pg1.php), la pagina pg1.php controlla le informazioni e se non soddisfano alcuni criteri rimanda alla pagina col form e manda in output dei messaggi di errori con degli if come quello sopra,

come faccio a non far federe quel tipo di errore?

un'altra cosa, come mai se clicco i pulsanti per inviare non mi visualizza la pagina pg1.php?

codice completo della pagina
codice:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<?php 
//include("config.inc.php");
?>
  <meta http-equiv="Content-Language" content="it">
  <title>## Archiviation Tools ## Fototeca Comunale di Civitanova
Marche</title>
  <meta content="text/html; charset=windows-1252"
 http-equiv="Content-Type">
</head>
<body leftmargin="0"
 onload="if (self != top) top.location = self.location" topmargin="2"
 style="color: rgb(0, 0, 0); background-color: rgb(0, 0, 0);"
 link="#000000" alink="#000000" vlink="#496989">



<script>

function checkrequired(which){

var pass=true

if (document.images){

for (i=0;i<which.length;i++){

var tempobj=which.elements[i]

if (tempobj.name.substring(0,8)=="required"){

if (((tempobj.type=="text"||tempobj.type=="textarea"||tempobj.type=="password")&&tempobj.value=='')||(tempobj.type.toString().charAt(0)=="s"&&tempobj.selectedIndex==-1)){

pass=false

break

}

}

}

}

if (!pass){

alert("NON HAI INSERITO TUTTI I DATI OBBLIGATORI PER ESSERE MEMBRI")

return false

}

else

return true

}

</script>
<div align="center">
<table style="border-collapse: collapse;" bgcolor="#5884a8" border="0"
 bordercolor="#111111" cellpadding="0" cellspacing="0" height="1"
 width="602">
  <tbody>
    <tr>
      <td colspan="2" bgcolor="#507ca0" height="1" width="786">[img]images/logo_r1_c1.jpg[/img]</td>
    </tr>
    <tr>
      <td bgcolor="#507ca0" height="1" width="205"> [img]images/logo_top_sx.gif[/img]</td>
      <td align="center" bgcolor="#5884a8" height="1" width="579">
      <p align="center"> [img]images/LOGO_2_3.gif[/img]</p>
      </td>
    </tr>
    <tr>
      <td colspan="2" height="5" width="786"><font face="Verdana"
 size="1">[img]images/bottomline.jpg[/img]</font></td>
    </tr>
  </tbody>
</table>
</div>
<div align="center">
<table leftmargin="0" border="0" cellpadding="2" cellspacing="0"
 width="768">
  <tbody>
    
    <tr valign="ABSMIDDLE">
      <td background="images/effect_r1_c2.gif" bgcolor="#496989"
 width="150">

      </td>
      <td bgcolor="#496989" height="20" width="70">

      </td>
      <td align="center" bgcolor="#496989" height="20"
 valign="absmiddle" width="360"></td>
      <td align="right" background="images/search_bg.gif"
 bgcolor="#496989" height="20" valign="absmiddle" width="208">

      </td>
    </tr>
  </tbody>
</table>
</div>
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="768">
  <tbody>
    <tr>
      <td align="center" bgcolor="#000000" width="768"></td>
    </tr>
    <tr>
      <td align="center" bgcolor="#000000" width="768">
      <table bgcolor="#ffffff" border="0" cellpadding="0"
 cellspacing="0" height="401" width="66%">
        <tbody>
          <tr>
            <td style="border: 3px double rgb(66, 66, 255);"
 height="177">
            <div align="center"> <font color="#ff0000">
<? 
if($errore == 1)
	{
	$errore_text = "Utente non riconosciuto";
	echo "<img src=\"images/punto_esclamativo.gif\" border=\"0\" height=\"26\" width=\"30\">";
	echo $errore_text;
	echo '[img]images/punto_esclamativo.gif[/img]</font>';
}
?>
            <table border="0" cellpadding="0" cellspacing="0"
 width="92%">
              <tbody>
                <tr>
                  <td colspan="3">
                  <p align="center"><font size="5">Accesso alla
Consultazione </font></p>
                  </td>
                </tr>
                <form method="post" action="accesso.php"
 onsubmit="return checkrequired(this)"></form>
                <tr>
                  <td width="33%">Nome</td>
                  <td width="1%"></td>
                  <td width="60%"> <input name="requirednome" size="20"
 type="text"></td>
                </tr>
                <tr>
                  <td width="33%">Cognome</td>
                  <td width="1%"></td>
                  <td width="60%"> <input name="requiredcognome"
 size="20" type="text"></td>
                </tr>
                <tr>
                  <td width="33%">Ente</td>
                  <td width="1%"></td>
                  <td width="60%">
                  <select size="1" name="requiredente">
                  <option selected="selected">Opzioni</option>
                  <option value=""></option>
                  </select>
                  </td>
                </tr>
                <tr>
                  <td width="33%">Motivo della consultazione</td>
                  <td width="1%"></td>
                  <td width="60%"> <input name="requiredmotivo"
 size="40" type="text"></td>
                </tr>
                <tr>
                  <td colspan="3" width="96%">
                  <p align="center"> <input value="Consulta"
 name="visitatore" type="submit"></p>
                  </td>
                </tr>
              </tbody>
            </table>
            </div>
            </td>
          </tr>
          <tr>
            <td bgcolor="#000000"></td>
          </tr>
          <tr>
            <td style="border: 3px double rgb(66, 66, 255);">
            <table border="0" cellpadding="0" cellspacing="0"
 width="100%">
              <tbody>
                <tr>
                  <td>
                  <div align="center"> 

                  <font color="#ff0000">
<?php
 if ($errore == 2)
 	{
	$errore_text = "Accesso Negato";
	echo '[img]images/punto_esclamativo.gif[/img]</font>';
	echo '<font color="#ff0000">';
	echo $errore_text;
	echo '</font>';
	echo '[img]images/punto_esclamativo.gif[/img]';
}
?>
                  <table border="0" cellpadding="0" cellspacing="0"
 width="92%">
                    <tbody>
                      <tr>
                        <td colspan="3">
                        <p align="center"><font size="5">Accesso
alla Compilazione </font> [img]images/keys.gif[/img]</p>
                        </td>
                      </tr>
                      <form method="post" action="accesso.php"
 onsubmit="return checkrequired(this)"></form>
                      <tr>
                        <td width="33%">Username</td>
                        <td width="1%"></td>
                        <td width="60%"> <input name="requiredusername"
 size="20" type="text"></td>
                      </tr>
                      <tr>
                        <td width="33%">Password</td>
                        <td width="1%"></td>
                        <td width="60%"> <input name="requiredpassword"
 size="20" type="password"></td>
                      </tr>
                      <tr>
                        <td colspan="3" width="96%">
                        <p align="center"> <input value="Accedi"
 name="compila" type="submit"></p>
                        </td>
                      </tr>
                    </tbody>
                  </table>
                  </div>
                  

</p>
                  </td>
                </tr>
              </tbody>
            </table>
            </td>
          </tr>
        </tbody>
      </table>
      </td>
    </tr>
  </tbody>
</table>
</div>
</body>
</html>