kunzite1 wrote in php 😦tired

php upload script and mysql data manipulation

hmm... there dont really seem to be many php comm's here on the lj... anyway...

/downloads/upload.php
$section_names = [
  "one"       => "One",
  "two"       => "Two",
  "three"     => "Three",
  "one_1"     => "1",
  "one_2"     => "2",
  "one_3"     => "3",
  "two_a"     => "a",
  "two_b"     => "b",
  "two_c"     => "c",
  "three_i"   => "i",
  "three_ii"  => "ii",
  "three_iii" => "iii",
];

Form:

Section: // Get all table names in db. Set table name to value of options. Assemble table title for option labels.

Filename:
Description File:
Specifications File:
Zip File:
Image File:


--------------------------------------------------------
// Get POSTed files
// Desc: four_desc.txt
// Spec: four_spec.txt
// Zip : four.zip
// Img : preview.jpg

// Destination Directory: /downloads/one/2/four/
// Current Directory: /downloads/

// Change to /downloads/one/
//   If /downloads/one/ doesnt exist, create it

// Change to /downloads/one/2/
//  If /downloads/one/two/ doesnt exist, create it

// Change to /downloads/one/2/four/
//  If /downloads/one/two/four/ doesnt exist, create it

// Upload files to /downloads/one/2/four/
--------------------------------------------------------
// Connect to mysql database
// Insert title ("Four") into name varchar field.
// Insert filename ("four") into filename varchar field.
--------------------------------------------------------
// Downloads index page now displays "Four"
// under section "One", subsection "2".


x-posted to c0mp_g33ks, mysql, php, and kunzite1.