Autocomplete multi-select PHP Ajax

Job ID: 33878705

Budget: $10 – $30 USD

Have a script from here https://www.webslesson.info/2019/11/autocomplete-textbox-with-multiple-field-using-jquery-in-php.html that works fairly well. Want to modify it. Know just enough PHP and MySQL to be dangerous. Know almost no javascript.

1) For some reason, when I run this script and type a country like "Australia", if I hit the ENTER key, it shows the country twice. If I use the mouse, just once as it should.
2) Want to be able to POST values to another page, but not the country NAME. I want the country CODE. See result.php file and note the select query in fetch.php.
3) No access to a live database. But MySQL fields will be "country_code" and "country_name". I want "country_name" shown in autocomplete box, but "country_code" data to be posted to result.php page.
4) Would like to have MULTIPLE autocompletes on same page. One is the example here by COUNTRY, and maybe under that I'd like by LANGUAGE. So in that case, "language_name" and "language_code" would be in the database (i.e. "EN"=>"English", "FR"=>"French", etc). Want to SEE the full names in the autocomplete boxes, but post the code.

I hope that all makes sense. If you need to do it your own way and not this script, that's fine. All I want are TWO autocomplete boxes on one page that posts the "keys" for the autocompleted data from both tables. Preferably in two arrays (country, languages).

Thanks
Related categories: PHP JavaScript AJAX MySQL jQuery / Prototype