Make your own free website on
    Instructions      mySQL & PHP     my Knowledge Base
Quick Install -if mySQL and PHP is running on your Web server:

  • download the file:
  • unzip the zip file into a new local temporary subdirectory, like c:\temp\kb
  • copy or ftp all unzipped files (php and html files as text and all others as binaries) into your Web subdirectory, ie. /kb
  • make your Web subdirectory ie. /kb readable via the Web (chmod command for the files and the Web subdirectory, path for the Web subdirectory in the Web servers configuration file) -if necessary; mostly is this the default when creating a new subdirectory ie. /kb within your home directory on the Web server
  • call install.html  via Web address into your Web browser* (ie. http://localhost/kb/install.html) and follow the instructions there
  • call the start page of my Knowledge Base via Web address, like http://localhost/kb/knowledge.html, log in by clicking the icon: ,   type in a first test note and submit it there. A preferred start page could be also http://localhost/kb/lookup.php  with a search field entry only.
  • after completed installation remove the files: install.html, install.php  and translate.php  from your Web subdirectory ie. /kb
  • if it's o.k, delete the unzipped files in the temporary local subdirectory c:\temp\kb and also the temporary local subdirectory c:\temp\kb
*JavaScript should be enabled in the used Web browser.

Instructions in detail:

To install my Knowledge Base download the zip archive file or from: and unzip it into a new subdirectory on your Web server (ie. /kb).

Customize the file "knowledge.ini.php", the file "footnote.html", the file "top.html", select your own logo and change it with image "smile.gif" and your background image with "back.jpg" for the background of the Web pages and your are finished (if mySQL and PHP are installed and running on your Web server or localhost and the path for this Web application is aliased in the Web server's configuration menu or file). The file "knowledge.ini.php" could be modified by the install page: "install.html" and the related php script "install.php". The URL address for the installation by install.html and install.php on localhost is:

      http://localhost/kb/install.html      if your virtual Web directory is /kb

Fill out on input fields your settings or select suggested options there and submit it. To translate the Web page content (11 pages) into another language as the present languages click the language link on install page, this takes some time.

After completed installation, please remove these files: install.html, install.php and translate.php from your Web directory.

There must grant permissions to a user of mySQL with the userid from the init file: knowledge.ini.php with privileges like: select, insert, update, alter, create, delete, drop, reload, index on tables and databases with grant option go from allowed hosts; see table mysql.user or ask your DBA of the mySQL server on your used system. During installation of mySQL, you will be asked for that userid and password and it will be assumed the necessary privileges to that userid by default. On multiple user systems, it is preferable to use a separate userid for that PHP & mySQL application with own privileges which are not the complete root admin privileges. For that, use INSERT SQL statement on table mysql.user to insert a new user for using as userid in file knowledge.ini.php and GRANT SQL statement to grant permissions for the new user inserted into table mysql.user on your mySQL server.

The start pages of my Knowledge Base (that PHP & mySQL application) are knowledge.html or lookup.php. At a localhost with virtual Web path $path = "/kb" is the URL address for the Web browser ie.

            http://localhost/kb/knowledge.html   or
log in there by clicking of the icon: ,   type in a first test note and submit it. This test note could be deleted later.

The needed database on mySQL server and the knowledge bases (tables) will be created at the first login. The first login should be with username: admin and a password you are typed in on logon window. Be sure that the admin password is your own. You can create new knowledge bases (tables) by inserting the knowledge base names in the FORM selection list as new options in the file "tables.html" and select the configuration option $tables=true on file "knowledge.ini.php". You can also create as user "admin" new knowledge bases (tables) by calling the page "knowledge.php", "knowledge.php" can only be called if you want to reply (icon: )   to an existing message from the subject ("list.php") or message ("show.php") listing and you are logged in.

If the PHP script files were loaded into the Web browser (via Web address or localhost) and a user was not logged in, a line on the response page at the top tells the user to login.

There is a language option implemented. On configuration file knowledge.ini.php there could be defined at present 3 languages of the Web page text content: $language="english" or $language="french" or $language="german". The selected language uses the language files from the related PHP script file names.

If you speak other languages and would translate the language files in your language you could do it, ...and if you are so nice you can send me a copy to provide these language files here to share it with others, Thanks!.

The following files will be unzipped:


The file readme.html include this instructions (could be removed from your public Web directory where you provide this tool).

knowledge.ini.php file includes the following configuration
options for the PHP scripts (lines with pre // are comment lines):

// name or IP-address of mySQL database server,
// userid and password for that server
$server      = "localhost";
$userid      = "mySQL_userid";
$passwd      = "mySQL_password";
$verbindung = @mysql_connect($server, $userid, $passwd) or
              die("Sorry!<br><br> no connection to mySQL" .
              " database server at host: $server.<br><br>" .
              " That could be happen:<br>" .
              " if the mySQL user: $userid" .
              " has no access to the mySQL server,<br>" .
              " or the mySQL database server is down at present,<br>" .
              " or you are using wrong userid/passwd on file knowledge.ini.php.");

// name of mySQL database
//      note: on some hosts, this name is restricted or 
//            pre-defined with value of $userid, ie. "mySQL_userid".
$db          = "know";

// name of administrator table in mySQL database $db
$know_admin  = "my_admin";

// tables are defined in file "tables.html" on FORM selection list
// and uses more than one knowledge bases (tables) in $db "know"
// $tables = true;   // switches this feature ON
// $tables = false;  // switches this feature OFF 
$tables      = false;

// default Knowledge Base table in $db
if (!$tables) $table       = "howto";

// language of Web page content
//$language    = "german";
//$language    = "french";
$language    = "english";

// $charset sets the character-set for the used Web browser
$charset     = "iso-8859-1";

// virtual Web path (alias on Web server path for that
// mySQL & PHP application) with one trailing slash (no leading slash)
// (all files from '' must be unzipped and saved into the
// subdirectory with that virtual path on your Web server or localhost)
$path        = "/kb";

// out fit parameters of Web pages
$bgcolor     = "whitesmoke";
$background  = "back.jpg";
$text        = "black";
$link        = "navy";
$alink       = "blue";
$vlink       = "mangenta";
// color of key on found search result page $searchcolor = "red"; //darkblue, navy, etc. $body = "text='$text' link='$link' alink='$alink' vlink='$vlink' bgcolor='$bgcolor' background='$path/$background'"; ?>

The red values  above in the file knowledge.ini.php are to customize to the conditions on your Web server settings or localhost.

Create & Delete one or more Knowledge Base Tables

If a knowledge base table does not exist, this table will be created by "login.php" or by "insert.php". In other words, if a user logs in or the logged in user selects another table and inserts a message, the table will be created. Within the file knowledge.ini.php is to set the statement $tables=true if you'll use multiple knowledge base tables or, if you want to use only one knowledge base tables use the statement $tables=false.

New knowledge base tables can be added in "tables.html" by inserting of new names in the FORM selection list with new option:

<FORM name='tabl'><TT>
<select name='tables' size=1 onChange='selectTable(this.form.tables)'>
<!-- option values must be enclosed with 'single' quotes and should be lowercase -->
<option value=''>Please select a specific Knowledge Base &nbsp; &nbsp;
<option value='howto'> &nbsp; howto
<option value='mykb'> &nbsp; mykb

If a knowledge base table should be deleted, remove the releated option on the HTML FORM selection list in file tables.html.

The user "admin" can also create new knowledge base tables by calling the page "knowledge.php". This page "knowledge.php" can only be called if you want to reply to an existing subject from the subject or message listing (icon ). That page "knowledge.php" offers the user "admin" the icons to create   or delete   knowledge base tables. The releated PHP scripts are create.php and delete_kb.php which update also the file "tables.html". In the file "knowledge.ini.php" must be set the option $tables = true if you want to use multiple knowledge base tables and will be create or delete tables as user "admin".

If you don't want to use this feature, set the $tables = false within the configuration file "knowledge.ini.php". This is preferable.

Password Security and login
The password to login with username on the startpages: "knowledge.html", "knowledge.php" or "lookup.php" (icon: )  will be encrypted by a simple-complicated algorithm -developed by the author- for using this tool also in Windows 95/98/2000/NT which have no default subroutine, like CRYPT on UNIX platforms. The e-mail will not be used in that version.

The username and password will be used only to check the permission for the access to the knowledge bases created by this tool; this is >>not<< the mySQL username and >>not<< the password to access mySQL on your server.

Security & Privacy
For saving secret or private messages or notes, this tool is to that unsuitable.

To list or search messages from the knowledge base only (icons: ) no login is necessary.

Message owners and the user "admin" can delete messages from the knowledge base message listing -if they are logged in. Therefore, the icon will be appeared on the message listing.

Well, that's all for now! Hope it's a nice tool.

And if you find an error condition, please send me a note (

This tool is provided   "as it is"   (no warrenty)
© Copyright of all scripts in this tool written in PHP & JavaScript by Arnold Schick