CP Home
Database
Description
Script Index
I-5 QMC
MySQL
Database
SQL
PHP
HTML
Email

Begin Registration - Database Maintenance Scripts

Produces a webpage form for selecting drivers for registration based on their home club and car class
Drivers registration records are kept in the racing.events table under seperate car class named fields
One registration applies to all races of that car class for the entire event



Script: begin_register_form.php

Input

From Maintenance Menu:
  1. home_club | text
  2. validate | text
From racing database:
  1. CURDATE() | today's date
  2. html.Car_Classes | array
  3. html.Club_Array | array
  4. html.Head | text
  5. html.Menu_Top | text
  6. html.Tail | text
  7. validate.Mode | text
Actions



Output

To add_registration_form.php on Submit Driver:
  1. race_date | date
  2. race_class | text
  3. Home | text
  4. home_club | text
  5. validate | text
To Display:




Script: add_registration_form.php

Input

From begin_register_form.php: See Output above

From racing database:
  1. html.Head | text
  2. html.Menu_Top | text
  3. html.Tail | text
  4. validate.Mode | text
  5. drivers.Driver_ID | array
  6. drivers.First_Name | array
  7. drivers.Last_Name | array
Actions



Output

To insert_registration.php:
  1. Driver_ID | integer array
  2. [Driver_ID]_pill | integer
    (one data item for each new registration)
  3. Race_Class | text
  4. race_date | date
  5. home_club | text
  6. validate | text
To Display:




Script: insert_registration.php

Input

From add_registration_form.php: See Output above

From racing database:
  1. events.[Race_Class] | array
    (registered drivers and their Pill Numbers)
  2. html.Head | text
  3. html.Menu_Top | text
  4. html.Tail | text
  5. validate.Mode | text
Actions



Output

To racing database:
  1. Update racing.events.[Car_Class] with current list of registered drivers
To Display:




Note: PHP arrays can't be stored in a database. They must be 'serialized' for storage and 'unserialized' when retrieved for use by the script as an array.