Location: PHPKode > scripts > CD-Stock Database Script > cd-stock-database-script/install.txt
Script:	cdstock.php
Topic:  CD-Stock Database Script
PHP:	PHP40RC2
Ver.:   1.0
Update: 16-5-2000
Author: hide@address.com
Notice: modify and use!

-----------------------------------------------------------------------------------------
why?

  it is a simple script not only to store your personal cd information but to learn about
  - databasehandling (mysql) with PHP4
  - form handling
  - file upload
  - POST and GET methods
  - includes
  - a script based on functions and one without

-----------------------------------------------------------------------------------------
todo:

  - automatic cover graphic-file type recognition (currently only tested with .gif)
  - procedural version of cdstock.php
  - making a class for the db access
  - making a class for the search environment

-----------------------------------------------------------------------------------------
files:

- cdstock.php		; main php file
- search.php		; search file
- shared.inc.php	; include file
- erase.gif		; image used in main php file

-----------------------------------------------------------------------------------------
directories:

- images		; contains erase.gif
- upload		; directory, where cd cover-images will be placed
			; it is only tested with gif files

-----------------------------------------------------------------------------------------
database table in mysql:

CREATE TABLE cdstock(
  id SMALLINT NOT NULL AUTO_INCREMENT,
  titel CHAR(30) NOT NULL,
  author CHAR(30) NOT NULL,
  datum CHAR(30) NULL,
  rubrik CHAR(30) NULL,
  email CHAR(30) NULL,
  url VARCHAR(40),
  kommentar VARCHAR(100) NULL,
  bild CHAR(20) NOT NULL,
  PRIMARY KEY(id),
  KEY(titel,author)
);

-----------------------------------------------------------------------------------------
installation:

1) create database table
2) modify $db = "yourdatabase" in the php files (cdstock, search) to fit to your database.
3) move the scripts to http://localhost/cdstock/
   if you like another path, please change the absolute paths in the php files
4) run http://localhost/cdstock/cdstock.php

   enjoy!

-----------------------------------------------------------------------------------------
Return current item: CD-Stock Database Script