this is what i have, much is missing...
<?php
$ano = null; //declare vars
$conn = mysql_connect("localhost", "root", "");
$db = mysql_select_db('concrete',$conn);
if(isset($_GET["cod_ano"]) && is_numeric($_GET["cod_ano"]))
{
$ano = $_GET["cod_ano"];
}
<script language="JavaScript">
function autoSubmit()
{
var formObject = document.forms['theForm'];
formObject.submit();
}
</script>
<form id ="theForm" name="theForm" method="GET">
<div style="width:1100px; height:768px;">
<table width="1090" height="766" border="0">
<tr>
<td width="600"></td>
<td style="margin-top:10px;"><select style="width:160px;" name="cod_ano" onChange="autoSubmit();">
<option value="cod_ano">Selecione o Ano</option>
<?php
$sql = "SELECT * FROM ano";
$array1 = mysql_query($sql,$conn);
while($row = mysql_fetch_array($array1))
{
echo ("<option value=\"$row[cod_ano]\" " . ($ano == $row["cod_ano"]? " selected" : "") . ">$row[nome_ano]</option>");
}
?>
</select>
<?php
if($ano!= null && is_numeric($ano))
{
?>
<select style="width:260px;" name="cod_curso" onChange="autoSubmit();">
<option value="cod_curso">Selecione o curso</option>
<?php
$sql2 = "SELECT * FROM curso WHERE cod_ano = $ano ";
$array2 = mysql_query($sql2,$conn);
while($row = mysql_fetch_array($array2))
{
echo ("<option value=\"$row[cod_curso]\" " . ($curso == $row["cod_curso"]? " selected" : "") . ">$row[nome_curso]</option>");
}
?>
</select>
<?php
if($curso!= null && is_numeric($curso))
{
?>
<br>
<br>
<select style="width:250px;" name="cod_disciplina" onChange="autoSubmit();">
<option value="cod_disciplina">Selecione a disciplina</option>
<?php
$sql3 = "SELECT * FROM disciplina WHERE cod_ano = $ano AND cod_curso = $curso ";
$array3 = mysql_query($sql3,$conn);
while($row = mysql_fetch_array($array3))
{
echo ("<option value=\"$row[cod_disciplina]\" " . ($disciplina == $row["cod_disciplina"]? " selected" : "") . ">$row[nome_disciplina]</option>");
}
?>
</select>
<input name="formSubmit" type="submit" value="Enviar" />
<input type="reset" value="Limpar" onclick="reset()" />
</p></td>
</tr>
</table>