I want to build a simple tagging system for my news section
DB setup (img borrowed from a previous post)

On my “Edit Article” screen, there are now tags sitting in an input field and the user can delete or type new tags. All good.
But when the page is submitted and I get this array of tag values, I’m thinking that I have to check each one against the ‘Tag’ table to see if it exists or not.
Is there any shortcut way of doing this or is it somehow possible to pass through tag_id=>tag_value? So far none of the preferred jQuery libraries seem to offer that: one, two
You should always check the submitted data on the server side as well.
If you are using MYSQL, you can try this:
The above code assumes you get an array of tag_id’s in the submit. If you instead get tag names, you just have to change