La Variable se llama PHP_SELF, además lo estás usando incorréctamente. es decir estás usando <?php dentro de un <?php cuando no es necesario.. Lo "casi" correcto sería:
Código PHP:
echo "
<form name='hartley1' action = '" . $_SERVER['PHP_SELF'] . "' method = 'POST'>
<input type='submit' name='Submit' value='Actualizar Datos'><p>
</form>
<form name='hartley2' method='post' action='confirmar.php'>
<input type='submit' name='Submit' value='Confirmar Compras' action='compras.php'><p>
</form>
";