<?php
session_start();
if (!isset($_SESSION['id'])) {
header('location:../');
exit(); // <-- terminates the current script
}
// close the php tag and write your HTML :)
?>
<html>
<body>
code
code
<!-- if you need another php tag somewhere else -->
<?php if(1 != 2) echo '<em>PHP works :)</em>'; ?>
code
code
</body>
</html>