Sorry, I’m not clear, it’s been a long weekend. I did not want to post all of the code - it’s huge.
I will if it will help.
I have a table of photograph information. This is for photographers who do not use digital cameras and need technical and business records of their work.
I have subordinate lookup tables for things like, the camera used, the lens used, developer, length of shot, location and country, etc.
I have had this working with built in arrays like this:
$fill_from_array_lens = array(
"50mm"=>"50mm",
"80mm"=>"80mm",
"210mm"=>"210mm",
"Auto"=>"Auto",
"Other"=>"Other");
$fill_from_array_location = array(
"Skopelos"=>"Skopelos",
"Eperus"=>"Eperus",
"Kefalohia"=>"Kefalohia",
"Persogiani"=>"Persogiani",
"Other"=>"Other");
$fill_from_array_country = array(
"United States"=>"United States",
"Greece"=>"Greece",
"Albania"=>"Albania",
"France"=>"France",
"France"=>"France",
"United Kingdom"=>"United Kingdom",
"Other"=>"Other");
//$fill_from_array_film = array(
//"Kodak TriX"=>"Kodak TriX",
//"Digital"=>"Digital",
//"Other"=>"Other");
$fill_from_array_exp = array(
"1.8"=>"1.8",
"2"=>"2",
"2.8"=>"2.8",
"4"=>"4",
"5.6"=>"5.6",
"8"=>"8",
"11"=>"11",
"16"=>"16",
"22"=>"22",
"Auto"=>"Auto",
"Other"=>"Other");
$fill_from_array_filmspeed = array(
"2000"=>"2000",
"1000"=>"1000",
"500"=>"500",
"256"=>"256",
"128"=>"128",
"64"=>"64",
"32"=>"32",
"16"=>"16",
"8"=>"8",
"4"=>"4",
"2"=>"2",
"1"=>"1",
"M"=>"M",
"Auto"=>"Auto",
"Other"=>"Other");
$fill_from_array_filmISO = array(
"25"=>"25",
"50"=>"50",
"100"=>"100",
"200"=>"200",
"400"=>"400",
"800"=>"800",
"1000"=>"1000",
"1200"=>"1200",
"1500"=>"1500",
"Auto"=>"Auto",
"Other"=>"Other");
This method offers no flexibility, as any change to a table has to be made by me.
Soo, I am starting to build an external array that can be managed by the user.
You can see the current status here:
beatricehamblett.com/db
The u/p is beatrice/Skopelos2009
It’s test data, and I have backups…
As a primary goal, I need to know what I’m doing wrong, in that the key rather than the value, is being passed back.
As an even more primary goal, I’d really appreciate learning if there is a better approach to this. I have a lot to learn.