Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy my auto completion script (jquery) did not work on my website?
    primarykey
    data
    text
    <p>I have downloaded an auto completion(jQuery script) form from net. I am using wamp phpmyadmin server for testing my website(php and mysql) in my computer. When i used the auto completion form in my wamp server it is working properly but when i uploaded to actual website server the script is not working. I am not able to find the problem, its showing no error. can you help me</p> <p>this is my html script</p> <pre><code> &lt;script type="text/javascript" src="js/jquery-1.4.2.js"&gt;&lt;/script&gt; &lt;script type='text/javascript' src="js/autocomplete.js"&gt;&lt;/script&gt; &lt;link rel="stylesheet" type="text/css" href="css/autocomplete.css" /&gt; &lt;script type="text/javascript"&gt; $().ready(function() { $("#name").autocomplete("php/autocompletion.php",{ width: 260, matchContains: true, //mustMatch: true, //minChars: 0, //multiple: true, //highlight: false, //multipleSeparator: ",", selectFirst: false }); }); &lt;/script&gt; </code></pre> <p>autocompletion.php file</p> <pre><code> &lt;?php $host="localhost"; // Host name $username="name"; // Mysql username $password="password"; // Mysql password $db_name="dbname"; // Database name $con = mysql_connect($host,$username,$password) or die(mysql_error()); mysql_select_db($db_name, $con) or die(mysql_error()); $q = strtolower($_GET["q"]); if (!$q) return; $sql = "SELECT DISTINCT 'name' AS 'name' FROM 'name' Where 'name' LIKE '%$q%'"; $rsd = mysql_query($sql); while($rs = mysql_fetch_array($rsd)) { $cname = $rs['name']; echo "$cname\n"; } ?&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload