I'm trying to make a form that will display a product, that will allow me to type in a number of how many i want to buy, and then a submit button that sends tvs and tvno to another document. The first option with the SELECT is working, but the 2nd(my desired display of the "shop") doesnt.
<!--FORM NR 1-->
<form action="http://localhost/wordpress/restock/myDbMod/" method="post">
<table>
<caption>Sales</caption>
<tr>
<td><select name='tvs'>
<?php
foreach ($tvs as $tv) {
printf("<option value='%s'>%s inch, in stock: %s</option>
"
, $tv->getScreenSize()
, $tv->getScreenSize()
, $tv->getStockLevel());
}
?>
</select></td>
<td><input type='text' name='tvno'/></td>
</tr>
<tr>
<td></td>
<td><input type="submit" value="Send"/></td>
</tr>
</table>
</form>
<!--FORM NR 2-->
<form action="http://localhost/wordpress/restock/myDbMod/" method="post">
<table>
<?php
foreach ($tvs as $tv) {
printf("<tr><td name='tvs' value='%s'>%s inch, in stock: %s</td><td><input type='text' name='tvno'/></td>
"
, $tv->getScreenSize()
, $tv->getScreenSize()
, $tv->getStockLevel());
}
?>
<td><input type="submit" value="Send"/></td></tr>
</table>
</form>