summaryrefslogtreecommitdiffstats
path: root/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'index.php')
-rw-r--r--index.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/index.php b/index.php
index 71d4050..57145c6 100644
--- a/index.php
+++ b/index.php
@@ -33,8 +33,15 @@ if(myisset("logout"))
}
else if(myisset("new"))
{
- $names = DB_get_all_names();
- output_form_for_new_game($names);
+ if( isset($_SESSION["name"]) )
+ {
+ $names = DB_get_all_names();
+ output_form_for_new_game($names);
+ }
+ else
+ {
+ echo "Please log in.";
+ }
}
/*check if everything is ready to set up a new game */
else if( myisset("PlayerA", "PlayerB","PlayerC","PlayerD","dullen","schweinchen","call" ))