Spongebob
-
Posts
3 -
Joined
-
Last visited
Posts posted by Spongebob
-
-
The table rows represent an animal species. The cells within a row represent traits of that species.
User data is compared against the corresponding data in row cell of the table (http://virginianaturalhistorysociety.com/temp/table.png)
When user data matches the corresponding cell in a row a 1 is returned, else a 0. Table rows are then sorted by highest score (most matches) and displayed to the user.
For example:
The user data = Sandhills, Slender, Smooth, Uniform, Brown, White
The user data is compared against the corresponding data in each row cell of the table (http://virginianaturalhistorysociety.com/temp/table.png)
Species (row) one has 3 matches
Species (row) two has 4 matches
Species (row) three has 6 matches
Species (row) four has 3 matches
Rows would be sorted by the number of matches:
1. Species (row) three has 6 matches
2. Species (row) two has 4 matches
3. Species (row) one has 3 matches
4. Species (row) four has 3 matches
-
The objective is to have the user provide some characteristics via a form. Based on the user’s input the php program would output a resorted table placing the nearest match on the top, with the second closest match on the second row and so on.
I believe the table is small enough to store in an array?Some of the cells/fields can hold multiple values. Should these be stored as an array within an array?Sample table: http://virginianaturalhistorysociety.com/temp/table.pngThe full table has 40 rows.Thank you for your suggestions and advice.
Chapter 2 - Script 2.1 - form.html
in PHP for the Web: Visual QuickStart Guide (5th Edition)
Posted
Line 24 of the script:
Generates two - "Missing associated label" warnings and one "invalid id reference" error when using JetBrains PHPStorm 2020.2. Why and how can this be corrected?
Despite the warnings and error messages, the script functions correctly.
Thank you!