How to create equal stack overflow tag field?

Asked

Viewed 44 times

0

I am developing a website of recipes and one of the fields to register the revenue, are the tags.

I wanted to put a function equal to the stackoverflow, an input that as I type it brings the tags and, when I click, it adds this input, to then feed the table. And also wanted the possibility to insert a new tag if it doesn’t already exist

I have 3 tables, the recipe, the tag and which links the tag with the recipe

receitas
idreceita|nome
1        |Como fazer arroz

tags
idtag|nome
2    |fim de semana

receita_tag
id|idreceita|idtag
1 |   1     |  2

I’m using PHP and Mysql

  • If you are using Jquery you can take a look in that lib, she would help to do the desired

  • Take a look at this question ( https://answall.com/questions/107651/input-do-typo-text-similar-ao-system-oftags-do-stack-overflow?rq=1 ) and see if the answer helps. Pax.

  • The only thing you did was the tables? And php?

  • @Guilhermecostamilam created a php form that inserts the Infos in the recipes table, but the tag is just like this <input type="text" name="tag">. I’ll see that other link

  • An easier way to start is to create a multiselect with existing ones and a text field for new ones

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.