Could you not simply place the php code within the html parameters? And you also forgot the closing option tags in the php echo.
HTML Code:
<form method="POST" name="roomcount" action="<?=$_SERVER['PHP_SELF']?>">
<p><select size="1" name="Dropdown1" onchange=roomcount.submit()>
<option value=" ">[Select]</option>
<option value="1">Option1</option>
<option value="2">Option2</option>
<option value="3">Option3</option>
</select>
<?php
$count = intval($_POST['Dropdown1']);
while(++$i <= $count)
{
echo "<b><u>Bedroom $i</u></b> <br>";
echo "Bedroom Type: <select name=bedroom_type>";
echo "<option value=single>Single Room</option>";
echo "<option value=double>Double Room</option>";
echo "</select> <br>";
echo "Ensuite: <input type=radio name=ensuite value=Yes> Yes ";
echo "<input type=radio name=ensuite value=No> No <br>";
echo "Rent: <input type=text name=rent Size=25><br><br>";
}
?>
<form>
</td>
</tr>
Bookmarks