Hi folks,
I am looking for help with the logic of writing a custom php script to use a form to query a single table in a database, do a simple calculation on each of the returns from the query, and then display the set of values/returns back to the user in a table.
The form comprises of four drop-down string fields populated from the table, with an additional number field that the user enters (x).
One way of looking at this - I know this is perhaps not correct but it serves to explain the objective, is that I want to:
1. Run a 'filter record' of the four drop-down table field values (number variables) the user selects in the form;
2. Return four number values (I guess an array) from each of the corresponding records in the table that meet the filter criteria;
3. Do a preset calculation on each of the returned record arrays using the additional number variable (x) chosen by the user in the form;
4. Display the results back to the user in a table.
I have been learning basic php - but trying to figure out how to appropriately approach/structure this challenge (which I am guessing is relatively straight-foward if you know how) is leaving me scratching my head a little.
If this is too big of a request or meets with the reaction, 'go hire a pro-coder to do it for you', then totally fair enough.
Or if there are pointers to some useful worked examples to follow, and / or if someone is willing to do a little coaching, then I would be very grateful to sweat a bit, and work it out with a guiding hand.
I have been looking around, and will continue to do so.
Thanks!
I am looking for help with the logic of writing a custom php script to use a form to query a single table in a database, do a simple calculation on each of the returns from the query, and then display the set of values/returns back to the user in a table.
The form comprises of four drop-down string fields populated from the table, with an additional number field that the user enters (x).
One way of looking at this - I know this is perhaps not correct but it serves to explain the objective, is that I want to:
1. Run a 'filter record' of the four drop-down table field values (number variables) the user selects in the form;
2. Return four number values (I guess an array) from each of the corresponding records in the table that meet the filter criteria;
3. Do a preset calculation on each of the returned record arrays using the additional number variable (x) chosen by the user in the form;
4. Display the results back to the user in a table.
I have been learning basic php - but trying to figure out how to appropriately approach/structure this challenge (which I am guessing is relatively straight-foward if you know how) is leaving me scratching my head a little.
If this is too big of a request or meets with the reaction, 'go hire a pro-coder to do it for you', then totally fair enough.
Or if there are pointers to some useful worked examples to follow, and / or if someone is willing to do a little coaching, then I would be very grateful to sweat a bit, and work it out with a guiding hand.
I have been looking around, and will continue to do so.
Thanks!