if you need to display a value at the top of the page and you're struggling with php, use javascript innerHTML....
<tr>
<td colspan="10"> </td>
<td align="right" id="generate_btn">
</td>
</tr>
$nextyr=year +1;
$mesx = <<<EOF
<script type="text/javascript">
document.getElementById("generate_btn").innerHTML='<input type="submit" value="generate $nextyr" name="generate" onclick="document.location.href=eaform.php?year=$nextyr"'
</script>
EOF;
echo $mesx;
