Need help for FCBK auto complete script for collecting data from database

Hello guys, I am developing a site its basically base on food recipe . So when user want to add recipe they need to type ingredients name so i want a process where when they will type ingredients name then website will show them some of suggestions like this script : http://www.emposha.com/demo/fcbkcomplete/ and its working and i already able to insert those array data in my database.

But problem is that script collecting ingredients name from a .txt file but i want to collect ingredients name from my database. So i need a script where user can choose multiple ingredients at a time and able to collect ingredients from database and if any ingredients name will not be in database then it will insert automatically inserted while user will submit recipe. i can give you my recent script too. its same as insert tag in database and collect those from database.

Thank you.