The Bradley Moon PHP Database Script Documentation

Current Version: 1.0

Type: hidden
Allows a page to update a field of the database without displaying it on the screen.

Uses: $name, $text

Example: add_field ('hidden', 'last_viewed', date("m/d/Y"), '');

Type: pk
Defines the primary key when loading from the previous page. If zero or blank, a new record is added to the database.

Uses: $name

Example: add_field ('pk', 'id', '', '');

Type: textbox
Adds a textbox to the current form. If admin rights are set, allows the user to change the data.

Uses: $name, $text, $size

Example: add_field ('textbox', 'fname', '', '');

 

Sample Application:

require("bradley.php");

$form = new application('localhost', 'users', 'username', 'password');

$form->add_field ('textbox', 'fname', '', '');