Hi, I'm asked to create forms for adding recorded data involving climate research, with many inter-dependencies making the queries somewhat complex. I have to work with PHP Version 4.4.4 and MySQL server version 4.1.18 The budget is quite low, so we can't hire a programmer to build this for us, which is why I was asked to do it. (I already maintain basic html/php and some cms-es etc.)
So far I have only created user-access and emailing forms using php and mysql, working from existing examples, which was easy for me. I understand the basics in most syntaxes if I see them.
But now I bump into a lot of issues that are not so easy to find examples for. I hope someone here could point me to some good examples, or show me an example tailored to the data mentioned below;
One important thing is that they want me to put many form actions on just one page, with one submit button, and even make some values conditional depending on the first entered value in the first form part. They want to have an overview over data that's being added.
(Access control is not an issue, the forms already have access levels arranged via pmwiki actually).
Let me describe the involved structure and actions I need for one of the forms, so maybe someone can help me get on the way;
In an existing MySQL TABLE_X the user needs to add a new record to field_x but I need to check if the record (a 6 digit value) already exists in field_x and if it does, the form needs to show some connected data from other tables and fields below the form entry.
If the record does NOT exist yet (as filled in a textbox by the user), it should of course be added under field_x.
Aside from this, whatever the user has filled in ALSO needs to go into field_y which resides in TABLE_Y and in field_z residing in TABLE_Z (this is hidden from the user).
In the same form-page I then need a dropdown box showing all the records in field_a from TABLE_A, but need to show only those records in the dropdown for which field_b (from the same TABLE_A) has values (record) xx and yy.
At submit the user selected item from field_a should be added as field_h which resides under TABLE_H
If anyone can give me an example, using the above mentioned names, I'd be very grateful. I learn fastest and best working with actual real-life code pieces. I don't know how to best accomplish cross table reading and writing from MySQL in one form field.
I already found some basic examples that were useful for making the connection to the database, which I have working.