You copied this from a book? I'd say.. Leave the book.. Doesn't seem too good to me:
exit('<p>Unable to connect to the ' . 'database server at this time.</p>');
should better be:
exit('<p>Unable to connect to the database server at this time.</p>');
exit('<p>Unable to locate the joke ' . 'database at this time.</p>');
should better be
exit('<p>Unable to locate the joke database at this time.</p>');
Your error is related probably to:
<?php if (isset($_POST['name']));
which is missing a { :
<?php
if (isset($_POST['name']));
{
which should be ended after this:
<p><a href="authors.php">Return to authors list</a></p>
should be:
<p><a href="authors.php">Return to authors list</a></p>
}