index.php
<html> <head> <title>ы</title> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script> <script type="text/javascript" src="jquery.autocomplete.js"></script> </head> <body> <script type="text/javascript"> $(document).ready(function(){ $("#search").keyup(function(){ $("#search").autocomplete("json.php", { delay:10, minChars:4, maxItemsToShow:3 } ); }); }); //?word=" + $("#search-text").val() </script> <form action=""><input type="search" id="search"> <input type="submit"></form> <body>
json.php
<?php echo json_decode($_GET['q']);
How to make it work? Here you can use the json file?
json_decode($_GET['q'], true)
this once and twice --- NEVER do so;) process GET / POST requests without checking them will lead to disastrous consequences ... - thunder