These are probably your problem:
print "<br /><br />First name is
>><strong><b> $firstname</b></strong>\n";
Replace every occurrence of >> with >> like so:
print "<br /><br />First name is
>><strong><b> $firstname</b></strong>\n";
You also do not appear to have fully compliant HTML, you need <html> tags and proper closing of all opened tags.
All that together makes this:
HTML Code:
<html>
<head>
<title>feedbackconfirmation</title>
<meta name="generator" content="BBEdit 9.3" />
</head>
<body>
<h1>Feedback Confirmation</h1>
<p>Thank you for taking the time to fill in the form. The information below will be
passed to the tutors.</p>
<div class="articles">
<?php
$firstname = $_POST["firstname"];
$lastname = $_POST["lastname"];
$dob = $_POST["dob"];
$comments = $_POST["comments"];
$module = $_POST["module"];
$session = $_POST["session"];
// Print the content of the PHP variables back to the user
print "<br /><br />First name is>><strong><b> $firstname</b></strong>\n";
print "<br />Last name is>><strong><b> $lastname</b></strong>\n";
print "<br />Date of birth is>><strong><b> $dob</b></strong>\n";
print "<br />Your comments are>><strong><b> $comments</b></strong>\n";
print "<br />Your module is>><strong><b> $module</b></strong>\n";
print "<br />You selected>><strong><b> $session</b></strong>\n";
print "<br /><br />";
$dbserverIP="localhost";
$dbusername="buddaman_woody";
$dbuserpassword="PASSWORD";
$connection=mysql_connect($dbserverIP,$dbusername, $dbuserpassword)or die("Couldn't connect to the dbserver.");
$dbname="buddaman_classlist";
$dbselectok=mysql_select_db($dbname,$connection) or die("Couldn't select the remote database.");
$sqlstatement="INSERT INTO classlist VALUES ('$firstname','$lastname','$dob','$comments','$mod ule','$session')";
$sql_result=mysql_query($sqlstatement,$connection) or die("Couldn't execute the SQL SELECT statement 1");
$sqlstatement = "SELECT * FROM classlist";
$sql_result = mysql_query($sqlstatement,$connection) or die("Couldn't execute the SQL SELECT statement 2");
?></div>
<p> Thank you </p>
<a href="FirstPage1.htm">Back to Homepage</a>
</body>
<html>