I don't understand what I'm doing wrong. Basically the form is going to be a worksheet with multiple sums where the user answers the questions and clicks submit at the end. So far I'm just trying to get the first sum in a mathematical way e.g. 1 2 << invisible input box to display random numbers * 3 4 ----- << input box to answer question ----- I hope that is clear enough. Here's my code: <form name="calc" method="post" > <table width="100" style="border:2px solid black;"> <tr> <td><input name="variable_a" value="1" type="text" id="variable_a" style="width:30px;font-size:35px;font-weight:bold;background:white;border:none;"></td> <td><input name="variable_b" value="2" type="text" id="variable_b" style="width:30px;font-size:35px;font-weight:bold;background:white;border:none;"></td></tr> <tr> <td><input name="variable_a" value="5" type="text" id="variable_a" style="width:30px;font-size:35px;font-weight:bold;background:white;border:none;"></td> <td><input name="variable_b" value="4" type="text" id="variable_b" style="width:30px;font-size:35px;font-weight:bold;background:white;border:none;"></td></tr> <td><input name="ans" type="text" id="variable_b" ></td> </table> </form> PHP: Here's a preview: http://www.onlinemovieguru.com/worksheet.php If you can help me stop the numbers being so far apart I will be very grateful. Thanks
For the first input field, add colspan="3" to the <td> tag so it would occupy 3 columns. <td colspan="3" align="center"><input name="ansc" type="text" id="variable_b"></td> It's the same for the 2nd input field but you forgot to surround the <td> tags with <tr>.