WITIMA YETU WELFARE GROUP — ONLINE REGISTRATION FORM
=====================================================

WHAT'S INCLUDED
----------------
register.php        The whole form: page + save logic in one file.
submissions/         Auto-created on first run. Each member's registration
                      is saved here as its own .json file, e.g.:
                      20260927_075617_jane_wanjiru_8c82e9.json
submissions/.htaccess Auto-created to block direct web access to the
                      folder (Apache only — see note below for Nginx).

REQUIREMENTS
-------------
Any ordinary PHP web host works (PHP 7.4+). No database needed.

HOW TO DEPLOY
---------------
1. Upload register.php to your web host (e.g. via cPanel File Manager
   or FTP) into any folder, for example: /public_html/register/
2. Make sure that folder is writable by PHP (most shared hosts already
   allow this — if you get a "could not be saved" error, set folder
   permissions to 755, or 775 if your host requires it).
3. Visit https://yourdomain.com/register/register.php in a browser.
   That's it — the submissions/ folder and .htaccess are created
   automatically the first time the page runs.

READING THE SAVED DATA
------------------------
Each member becomes one JSON file in submissions/, named with the
date/time, the member's name, and a random code, so files never
overwrite each other. Open a file in any text editor to see fields
like full_name, phone, kin_name, children, beneficiaries, etc.

To list every member from the command line:
    php -r '
      foreach (glob("submissions/*.json") as $f) {
        $d = json_decode(file_get_contents($f), true);
        echo $d["membership_no"], " - ", $d["full_name"], " - ", $d["phone"], PHP_EOL;
      }
    '

If you would prefer one combined spreadsheet instead of separate
files, this can be added later (e.g. a small admin page that reads
every JSON file in submissions/ and exports a CSV) — just ask.

SECURITY NOTES
----------------
- The submissions folder is protected from direct browser access on
  Apache via the auto-created .htaccess (Require all denied). If your
  host runs Nginx instead of Apache, .htaccess has no effect — ask
  your host to block the /submissions/ path in the server config, or
  move the folder outside the public web root and update
  $submissionsDir in register.php to point to it.
- This form has no login — anyone with the link can submit a
  registration, same as a paper form handed out at a meeting. If you
  want it restricted to invited members only, a simple shared access
  code can be added.
- No email/SMS notifications are sent automatically; the committee
  should check the submissions/ folder periodically, or ask for that
  feature to be added.

CUSTOMISING
-------------
- Colours, fonts and the logo mark are all in the <style> block and
  the small inline SVG near the top of register.php.
- Field labels/sections mirror the printed registration form
  (A–G): Personal Details, Current Residence, Ancestral/Home Village,
  Next of Kin, Beneficiary Information, Membership & Contribution,
  and the Member Declaration.
