PHP Samples
------------
1 PHP Sample Files Purpose
2 How to Run PHP Samples in Windows
3 How to Run PHP Samples in UNIX


1 PHP Sample Files Purpose
---------------------------
    Sample: basic\odbc-t1.php

    Purpose: 
        The files odbc-t1.php, odbc-t2.php, odbc-t3.php, odbc-t4.php and
        odbc-t5.php are an example of DBMaster database basic function in
        PHP.


    Sample: poll\01demo.php

    Purpose: 
        This sample demostrates a simple vote system. You can select one of 
        the two option. The system return the results shows the percentage 
        distribution. 


    Sample: poll\voteadmin.php

    Purpose:
        This sample demostrates how to use PHP to develop database 
        application by an vote system example.


    Sample: register\user.php

    Purpose:
        This sample demostrates how to use PHP to develop database 
        application by an register example which records name, address, 
        telephone, etc. information.


2 How to Run PHP Samples in Windows
------------------------------------
    Install PHP:
        1. Now all Windows binaries can be used on Windows 95/98/Me and
           on Windows NT/2000/XP. 

           The binaries packaged as Windows installer to install and 
           configure PHP, and automatically configure IIS, PWS and Xitami, 
           with manual configuration for other servers.

           For details, please refer to 
 
             http://www.php.net/downloads.php


        2. After installation, you need to configure php.ini to run 
           the sample.
         . Set asp_tags = On.     
	 . Set register_globals = On.
         . Set extension_dir = the extension DLLs directory.
         . Delete (;) before php_gd2.dll in Windows Extensions.
         . Set error_reporting = E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR.                            
           Therefore, the warning messages will not show up.       
         . For further details, please read the README file with PHP package

    Execute:
        1. It is recommended to use the SYSTEM DSN instead of USER DSN.
           Register the ODBC DSN properly.

        2. copy the php sample to the web server distribute directory.

        3. Launch Browser.

        4. Locate the PHP file URL address you want to run.

3 How to Run PHP Samples in UNIX
---------------------------------
    Install PHP:
        1. To install PHP on UNIX to be a Apache Module Version.
           Please refer to
             http://www.php.net/manual/

        2. Make sure you have enable unixODBC and GD support. For example:
           (Note: /APP_HOME : DBMaster home directory)
           
             % ./configure \
                --with-unixODBC=/APP_HOME \
                --with-apxs=/usr/local/www/apache/bin/apxs \
                --with-gd=/usr/local/php-gd
             % make
             % make install
             
        3. After installation, you need to configure php3.ini to run 
           the sample.
         . Set asp_tags = On.

        4. Stop and restart your Apache web server.

    Execute:
        1. copy the php sample to the web server distribute directory.

        2. Launch Browser.

        3. Locate the PHP file URL address you want to run.
