School list and ratings
Demonstration of framework of item list with ratings and reviews.
Do not run this file locally!
Run it from your local or remote web http server where is installed PHP.
Source files:

Schools.html

(this html page),

SchoolsDef.xml

(static XML layout),

Schools.php

(server script generates and processes XML data and manages users),

SchoolsRatings.php

(server script generates XML with user ratings),

SchoolsReview.php

(server script saves user review to db),

../Database/Schools_Schools.txt, Schools_Ratings.txt, Schools_Reviews.txt

(source SQL database tables),

../Framework/IncDbTxt.php

(included script for SQL TXT database)

The PHP CGI or ISAPI service program must have write access to all files in folder /Examples/Php/Database

This example uses

PHP Text DB API

, a flat file SQL database. The PHP core files for txt database are located in /php-txt-db-api directory. The database is located in directory /Database where are stored tables as individual txt files.
For database access are used objects Database and Recordset defined in /Framework/IncDbTxt.php file.
You can change database provider to other (

MySql

,

ODBC

,

ADO

,

SQLite

,

SQLite3

) by including other IncDb...php file and changing connection string when creating Database object. See comments in Basic.php
There are three modes to work with data:
a) View all data and rate and review the schools. Default mode, without log in.
b) Edit data as user . Every user has his own data. You can log in as Jan, Magda, David, Adam, Linda , all without password. Or you can add new user by entering new name and password.
c) Edit all data as administrator . You can edit all data or even assign it to another user. You can log in as Admin, without password.
Log in to add or edit your events Name: Password: