I have this table working normally, and when I add an if statement (so that if you are not the author of the post you cannot edit or delete it) suddenly there is a big white space. It´s an if statement just including the 2 last columns (Edit, and Delete). Why could it be breaking?

<?php if ($_SESSION['username'] == $post_author) { ?>
<td><a href="posts.php?source=edit_post&post_id=<?php echo $id; ?>">Edit</a></td>
<td><a onclick="javascript: return confirm('Are you sure you want to delete this post?');" href="posts.php?delete=<?php echo $id; ?>">Delete</a></td>
<?php }else{ echo "<td></td></br><td></td>";} ?>
Thank you very much!
Aucun commentaire:
Enregistrer un commentaire