diff --git a/code/index.php b/code/index.php index 504d1b1..127603e 100644 --- a/code/index.php +++ b/code/index.php @@ -142,9 +142,7 @@ $database = new SQLite3("data.db"); -//$ph = $_POST["game_mode"]."|".$_POST["difficulty"]."|".$_POST["dotsAmount"]."|".$_POST["pause"]; -//echo "

".$ph."

"; - +// echo isset($_POST["game_mode"])." ".isset($_POST["difficulty"])." ".isset($_POST["dotsAmount"])." ".isset($_POST["pause"]); $toDisp=5; if(isset($_POST["game_mode"]) && $_POST["game_mode"]!="" && $_POST["difficulty"]!="" && $_POST["dotsAmount"]!="" && $_POST["pause"]!="") { @@ -157,8 +155,8 @@ else { $db_game_mode="5p"; $db_difficulty="easy"; - $db_dotsAmount=$_COOKIE["dotsAmount"]; - $db_pause=$_COOKIE["pause"]; + $db_dotsAmount=(isset($_COOKIE["dotsAmount"])) ? $_COOKIE["dotsAmount"] : 4; + $db_pause=(isset($_COOKIE["pause"])) ? $_COOKIE["pause"] : 1; } if(stristr($db_game_mode, "p") === FALSE) @@ -200,7 +198,6 @@ if(isset($_POST["game_mode"]) && $_POST["game_mode"]!="" && $_POST["difficulty"] echo ""; } - ?>