fixed checking unset variable, database changes

index.php - checked if a variable was set before checking the value
database_layout.txt has new and altered columns