How clean is my close_account code?
The code is overall good basic PHP and above the average. However, I would like it more structured.
For example, why you are setting the error reporting manually in this file? Apparently you have sort of a bootstrap file as includes/header.php, why not to put these lines there?
Besides, i don't see any point in the line assigning $post_id variable. What does a post id to do with deleting an account? And yes, such a syntax structure looks embarrassing.
It is also a good rule of thumb to follow Location header with an explicit exit call. Although it is not critical in this particular case, sometimes the lack of the script termination could pose a serious threat, as the header itself doesn't stop the script execution.
Some notes on the database structure

The computer world has its own representation for &quot;yes&quot; and &quot;no&quot;, it's 1 and 0 respectively. So consider making the field of tinyint type instead of varchar.
it is considered a good practice to address all database entities by the unique id. It's better to store the user id in the session and use it for all the database operations.

The code structure
One big issue I overlooked at first is the structure of your script. It seems that includes/header.php is not just a bootstrap file but it also starts some HTML output. that's a big NO. An HTTP header such as Location cannot be sent after HTML. Your PHP lets you to do it due to some permissive setting, but it is nevertheless wrong, from the logical and technological points of view. It just makes no sense to start any output when your script is not going to display anything but would only redirect to another page.
Split your includes/header.php file into two: bootstrap.php and header.php. The former should contain all the configuration options such as database connection, error reporting etc, but not a byte should it output. And the latter would contain all the HTML.
Than make your code like this
&lt;?php 

include 'includes/bootstrap.php';

$id= $_SESSION['user_id'];

if(isset($_POST['close_account']))
{
    $stmt = $con-&gt;prepare('UPDATE users SET user_closed = 1 WHERE id = ?');
    $stmt-&gt;bind_param(&quot;s&quot;, $id);
    $stmt-&gt;execute();

    session_destroy();
    header(&quot;Location: register.php&quot;);
    exit;
}
include 'includes/header.php';
?&gt;
&lt;center&gt;