Test etmeden yazdım hata olabilir
Edit // Bu test edilip onaylanmış hali
<form action="#" method="POST">
<input type="text" name="kac" />
<input type="submit" id="button" name="button" value="Aç" />
</form>
<?php
if ( isset($_POST['button']) ):?>
<form action="textarea.php" method="POST">
<?php
for ( $x=0; $x<$_POST['kac']; $x++ ):?>
<textarea id="<?php echo $x;?>" name="metin[<?php echo $x;?>]"></textarea>
<?php
endfor;?>
</form>
<?php
endif;
?>