Php block conflicting with edit bar


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?

echo $_POST['name'];

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

Check the browser console for errors.