<?php
if($_SESSION['username'] == NULL)
{
print "Нямаш права да си тука";
}
else
{
if(isset($_POST['add']))
{
$time = time();
$title = htmlspecialchars($_POST['title']);
$content = strip_tags($_POST['content']);
$q = "INSERT INTO posts(title,content,author,added) VALUES('$title','$content','Papazov','$time')";
mysql_query($q) or die (mysql_error());
?>
Why it says
Notice: Undefined index: username in C:\xampp\htdocs\MatchZone2\Addpost.php on line 17
for the index in the session in the begging ?