Very new coder here with something well out of my area of knowledge. I only have a very basic level of understanding of PHP and MySQL. To do what I want though, I believe can only be done with javascript/ajax/jquery – however I am not familiar at all with them.
Currently I have a form I have created to collect the data I enter and insert it into my database via PHP.
However, I don’t want to have multiple submit buttons.
I have one table (tagTypes) that has all the types of tags (tags_id) that I want to use in my fantasy miniature gallery database. These tags include such things as “environment”, “equipment”, “genus”, “species”, “sex”.
I also have a table (tags) that contains the tags and matches them to a tag type (2 columns, 1 for the “tags_name” and 1 for the “tags_id”. Both of these columns are primary key columns. Tag_names contains such values as “male”, “female” (associated with “sex”), “waterborne”, “airborne” (associated with “environment”), and etc.
I also have a table (miniTags) where I create a tag and associate it with a miniature (mini_id) from my miniatures table (minis).
When I wish to add a new tag for a miniature, I select the miniature id (mini_id) of the miniature I wish to add tags to, and then display a form. This form has 2 entry fields - one for tags_id and one for tags_name.
On the first entry field, I entered the tags_id (environment/equipment/genus/species/sex), then I want to be able to select from the list of available tags associated with that specific tag_id, on the second entry field. In example, if I select “sex” as the tags_id, then I want to be able to select from (male/female) which are the associated tags_names to tags_id.
Is this something I can do with javascript/ajax/jquery? Can someone please point me in the direction of a tutorial or code example out there that will show me what needs to be done. (Please keep in mind, all my code for doing queries is in PHP – so I need a way to transition between the two).