You need to create a tag script using Select2 fields ([login to view URL]) for my website.
The select field should be able to contain multiple tags (i should be able to set a maximum number) and should fetch existing tags from table "types" where "-cat_id" is the same as the users.
A user should also be able to input tags that dont exist in database and if they do the new tag should be saved to the table "types".
"site_types" should contain all the id´s of tags the user has saved for his/her site ("-site_id").
Code must be efficient and well programmed, you should use prepared statements using mysqli.
Table names are:
-cat_id (category id of what game category the type tag is for)
-type_status (enum 1 or 0)
-site_id (the id number of the site that adds the tags)
-types (the id number of the tag from the "types" table)
If you have any questions you are free to ask me at any time.