Location: PHPKode > projects > PHP Trivia > php-trivia/docs/readme.txt

PHP Trivia - Add pre-existing trivia games or create your own.
Copyright (C) 2005  Robin van de Vusse (hide@address.com)

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.


- A Trivia game written in PHP.  Use one or several of the trivia files that 
  come with the game, or create your own trivia questions/answers.


- PHP Trivia is dependent on:
	. Web service (has been tested on Apache 2.0.49 for Windows)
	. PHP (has been tested on PHP version 4.3.4 for Windows)
	. Database (has been tested on MySQL version 4.0.17 for windows)

- Create a trivia database.  The name of the database is not important.
- Create a UserID/Password for your trivia database.
- Decompress PHP Trivia and move it to a folder under your web site.
- Use the setup.sql file from the Initial Setup folder to import the initial tables.  I used PHPMyAdmin.
- For adding trivia games, go to the Trivia Files folder under Initial Setup 
  and import the sql file for the trivia you want to add.
- For creating trivia games, create a table.  The name of the table is not 
  important.  The table must have 3 fields with the following specifications:
  	Field Name	Specifications
  	id		int, NOT NULL, auto_increment
  	question	mediumtext, NOT NULL
  	answer		tinytext, NOT NULL
  What you place in these fields is self explanatory.
  Another method is to create an sql file and import it.  Use the sql files in
  Initial Setup/Trivia Files if you need an example to work from.
- Open config.php in a text editor and set the following variables:
  For connecting to the database:
  If a different Session path needs to be specified instead of the default path:
  (Can be left blank if default path is to be used.)
  For connecting to the trivia tables:
	- Add a line within the curly braces of $strTriviaTables using the 
	  following syntax:
	  array("table name", "trivia description that will show in your trivia game")
	- To use any of the pre-existing trivia files, simply uncomment them.
	- Place a comma after each line except for the last one.

- Open a web browser and point to your PHP Trivia folder, create a userid, login, 
  and play.  Have Fun!!!

Change History:
May 26, 2005 - 1.1 changes:
- Added $strSessionPath to config.php incase a different path needs to be used instead of the default path.
  This change was added to get php-trivia to work on sourceforge.
Return current item: PHP Trivia