php script inside an html table cell

I would like to do the following:
A table that includes, on the left half, questions in the 4 rows. And on the right half the php processing so it displays the answers to the questions of the form in that right-side cell.

The form and php processing work fine if the processing is either below or above the table. When I put the code in the right-side cell then the table rows are no longer displayed from row 2 (question2 in the example below) in the right column and below, and the page footer stuff is displayed in the right-side cell. I would really like to make this work, but I do have a backup design if necessary (I’ll just display the result below the questions, it just won’t look as good).

header
question1 PHP PROCESSING CODE HERE
question2
question3
question4

I got it working as expected. Here’s the code, unfinished but working, for anyone interested -

<?php include("header.inc"); ?>

Quiz - Unscramble the words

Questions - pick one word from each row

Question 1
Choose one: it today work does
<?

if( isset($_POST[‘radio1’]) AND isset($_POST[‘radio2’]) AND isset($_POST[‘radio3’]) AND isset($_POST[‘radio4’]) )
{
print “

This is the result of the words you picked:

”;

	      echo "<em>".$_POST['radio1']." ";
      echo $_POST['radio2']." ";
      echo $_POST['radio3']." ";
      echo $_POST['radio4']." ?</em></p>";
	}
	?>
Choose one: it today work does
Choose one: it today work does
Choose one: it today work does


           
Sponsor our Newsletter | Privacy Policy | Terms of Service