Start New Discussion within our Web Development Community

Hello, I dont know jquery. I am trying edit some code from web for autocomplete. Is it possible retrieve value afer submit from php page? What's way ? Or only with js ? Connection is ok, selecting too. Link to other page is created with paramaters. Thanks.

-- test.php --
require_once "config.php";


<title>jQuery Autocomplete Plugin</title>
<script type="text/javascript" src="jquery.js"></script>
<script type='text/javascript' src='jquery.autocomplete.js'></script>
<link rel="stylesheet" type="text/css" href="jquery.autocomplete.css" />

<script type="text/javascript">

    $().ready(function() {

        $("#course").autocomplete("get_course_list.php", {
                width: 260,
                matchContains: true,
                //mustMatch: true,
                //minChars: 0,
                //multiple: true,
                //highlight: false,
                //multipleSeparator: ",",
                selectFirst: false
<h2 id="banner">Ajax Autocomplete Demo 
- Jquery, PHP, Mysql</h1>
<div id="content">
        <form autocomplete="off">
                        Course Name <label>:</label>
                        <input type="text" name="course" id="course" />
                        <!--input type="button" value="Get Value" /-->
                <input type="submit" value="Submit" />
<div align="center">
<a href=""></a>

-- get_course_list.php --

require_once "config.php";
$q = strtolower($_GET["q"]);
if (!$q) return;

$sql = "select DISTINCT course_name as course_name from course where course_name LIKE '%$q%'";
$rsd = mysql_query($sql);
while($rs = mysql_fetch_array($rsd)) {
        $cname = $rs['course_name'];
        echo "$cname\n";
This article has been dead for over six months. Start a new discussion instead.