Php block conflicting with edit bar

concrete5.6.4.4

I am trying to create a form that saves fields on page as well as submits.

Using the php block I have added this code to my page.

However, the edit bar at the top disappears when I refresh.

Any ideas?

<?php
if(isset($_POST['name'])){
echo $_POST['name'];
}
?>

<form method="POST" action="../mytheme/form.php">
<p>Name</p>
<input type="text" name="name" value="<?php if(isset($_POST['name'])){echo htmlentities($_POST['name']);}?>"
<br>
<input type="submit" value="SEND">
</form>

Check the browser console for errors.