You're not escaping quotes " although for echo you should start and close with single quote '
echo '<form name="Patient" action="patient_history_display.php" method="get">';
echo '<input type="submit" value="Click here to view patient history">';
echo '</form>';
and by escaping, I mean adding a backslash to the " inside the echo like so:
echo "<form name=\"Patient\" action=\"patient_history_display.php\" method=\"get\">";
echo "<input type=\"submit\" value=\"Click here to view patient history\">";
echo "</form>";
as you can see, it's a hell of a lot easier to use quotes wisely!
or for big block stuff:
echo <<<END
This uses the "here document" syntax to output
multiple lines with $variable interpolation. Note
that the here document terminator must appear on a
line with just a semicolon. no extra whitespace!
END;
https://www.php.net/echo