Código PHP:
<form action"donde esté el script que genera el 2 form">
< input type="text" name="cantidad" />
<input type="submit">
</form>
<?php
if(isset($_POST["cantidad"])){
?>
<form>
<?php
$num=$_POST["cantidad"];
for ($i = 1; $i <= $num; $i++) {
echo "<input type=text name=ingrediente".$i."/><br/>";
}
?>
<input type="submit">
</form>
<?php
}
?>