Okay, so I already have a script to let users enter tags but I want to let users enter multiple tags that are separated by a comma for example, (html, css, php) and store each tag in the database.
Is there a tutorial that can show me how to do this or can someone give me a couple of examples that i can work from.
Thanks
Assuming a schema like this:
The Post Tag table is what’s called a join table for the many-to-many relationship from Post to Tag (because a Post can have multiple Tags and a Tag can be used on multiple Posts).
The user enters a list of tags separated by commas into an input field:
and you have an array of tags the user entered. You may want to sanitize them further, like only allowing certain characters and/or converting them to lowercase.
Then your code becomes: