Question: In PHP Save the first page as index.htm (or index.php) . Use a HTML form to capture user input. Submit the form to a second
In PHP
Save the first page as index.htm (or index.php). Use a HTML form to capture user input. Submit the form to a second file index_process.php using the POST method. (3 points)
- The second page contains a link to go back to the first page. (2 points for link)
- Write a program that asks the user for Pos row and column numbers for generating magic rectangles.
- Capture row and column numbers. (1 point) o Generate the magic rectangles shown using nested loops (two-dimensional loops).
- The first rectangle must be generated by nested while loops. (4 points)
while () {
while () {}
}
- The second rectangle must be generated by nested dowhile loops. (4 points)
do
{
do {} while ()
}
- The third rectangle and related calculation must be generated by nested for loops. (4 points)
for ()
{
for () {}
} 
Richard Ricardo's Kung Fu Panda Po Magic Rectangle Po's Magic Rectangle: Po's magic rectangle has 3 rows, and 4 columns. Nested while loop rectangle (XY)(XY)(XY)(XY) (XY)(XY)(XY)(XY) (XY)(XY)(XY)(XY) Nested do..while loop rectangle loc(t1,01); loc(r1,c2), loc(r1.c3); loc(+1,04), loc(r2,ci), loc(12,c2), loc(r2,c3); loc(r2,04), loc(r3,ci), loc(13,c2); loc(r3.c3); loc(r3,04); Nested for loop rectangle 1+1=2; 1+23; 1+34; 1+4.5 2+1=3; 2+2=4; 2+3=5; 2+4=6) 3+1-4, 3+2-5; 3+36) 3+47; back to scan Richard Ricardo's Kung Fu Panda Po Magic Rectangle Po's Magic Rectangle: Po's magic rectangle has 3 rows, and 4 columns. Nested while loop rectangle (XY)(XY)(XY)(XY) (XY)(XY)(XY)(XY) (XY)(XY)(XY)(XY) Nested do..while loop rectangle loc(t1,01); loc(r1,c2), loc(r1.c3); loc(+1,04), loc(r2,ci), loc(12,c2), loc(r2,c3); loc(r2,04), loc(r3,ci), loc(13,c2); loc(r3.c3); loc(r3,04); Nested for loop rectangle 1+1=2; 1+23; 1+34; 1+4.5 2+1=3; 2+2=4; 2+3=5; 2+4=6) 3+1-4, 3+2-5; 3+36) 3+47; back to scan
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
