xaznbabyx Posted September 21, 2015 Share Posted September 21, 2015 (edited) My teacher only says he wants user to enter a number for the size of the table and keep the the size is between 1 and 10, inclusive. It is not working and I don't get how to enter the number for the size, I think I am missing something? Im am not sure if what I am doing is correctly. http://hills.ccsf.edu/~schow11/cs130a/hw4.php <?php $cols = 11; $rows = 11; print '<table border="1">'; for ($n = 1; $n < $rows; $n++){ print '</tr>'; for ($i = 1; $i < $cols; $i++) print '<td>' .$i*$n. '</td>'; print '</tr>'; } print "</table>" ?> Create a set of PHP pages that allows the user to create a square multiplication table. The first page should contain one text box that asks the user the size of the multiplication table. Note, there should only one text box. Not two text boxes (one for the rows and one for the columns). The second page displays the multiplication table, which must include the numbers being multiplied and the answers. For example, your multiplication table could look like this: http://imgur.com/jyJnKBg In addition to creating the multiplication table, you page should: Ensure that the user enters a number for the size of the table. Ensure that the size is between 1 and 10, inclusive. Edited September 21, 2015 by xaznbabyx Quote Link to comment Share on other sites More sharing options...
cyberRobot Posted September 21, 2015 Share Posted September 21, 2015 My teacher only says he wants user to enter a number for the size of the table and keep the the size is between 1 and 10, inclusive. It is not working and I don't get how to enter the number for the size, I think I am missing something? Have you looked into using HTML form data with PHP? A quick example can be found here: http://php.net/manual/en/tutorial.forms.php Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.