Skip to content

Instantly share code, notes, and snippets.

View dbernar1's full-sized avatar

Dan Bernardic dbernar1

View GitHub Profile
@dbernar1
dbernar1 / index.php
Last active August 29, 2015 13:59 — forked from stungeye/index.php
<?php
/*
* This code implements a simple higher/lower guessing game.
*
* The computer picks a random number and the user guesses by way of an HTML form.
*
* The user is given hints if they guess incorrectly with the ability to try again.
*
* Upon winning the game the user can add their name to a session-based leaderboard.
*/
@stungeye
stungeye / index.php
Last active November 21, 2015 02:07
PHP Guessing Game - Attempt At Self-Documenting Code
<?php
/* This code implements a simple higher/lower guessing game.
The computer picks a random number and the user guesses by way of an HTML form.
The user is given hints if they guess incorrectly with the ability to try again.
Upon winning the game the user can add their name to a session-based leaderboard. */
require('session_game_functions.php');
session_start();