Hi, I'm giving permissions to my system, I generate a pdf by making queries to a database, it works perfect even when adding the if and validating the session start and the level of privilege of the user, but at the moment in which I use the else I get error 500 on my host, the code works and protects using only if it is really necessary to use else?
<?php
include_once 'resource/session.php';
include_once 'resource/Database.php';
include_once 'resource/utilities.php';
include_once 'partials/parseProfile.php';
include'fpdf/fpdf.php';
setlocale(LC_TIME,"es_ES");
if(!(isset($_SESSION['username'])) || !$_SESSION['editar_coa'] == 1 ){
echo"No tienes permisos para ver el coa";
}
else{
// aqui van el codigo que genera mi pdf
$pdf->Output();
}