jQuery UI Autocomplete not working at all!

So I am trying to impletemt a jQuery Autocomplete that pulls information from a MySQL database using PHP, and it doesn’t seem to be working at all! When I type a name into the field that I know is in the database, it doesn’t pull up anything. I echoed the PHP code to make sure that it was pulling information from the database, and it was, so I know that works. Here is my HTML:


<div class="search">
	<form method="post" action="#">
		<div class="left"><label for="quick-search">Quicksearch</label><input type="text" name="quick-search" id="quick-search" /></div>
		<div class="button"><input type="submit" name="submit" value="Search" /></div>
	</form>
</div>

Here is my PHP (file - people-autocomplete.php);


$people = array();
	
global $mysqli;

if ($stmt = $mysqli->prepare("SELECT first_name, last_name FROM people")) {

    	$stmt->execute();
	$stmt->bind_result($first_name, $last_name);
	$i = 0;
	while ($stmt->fetch()) {
    		$people[] = $last_name . ', ' . $first_name;
    		++$i;
	}
    	$stmt->close();
    	
	}	
	
	echo json_encode($people);

And here is the Javascript I put in the head of the HTML:

<script type="text/javascript">
	$(document).ready(function() {
		$("input#quick-search").autocomplete({
			source: "/manager/model/people-autocomplete.php",
			minLength: 1,
		});
	});
</script>

Any ideas?

Do you have a working example of this page as it would be easier to debug it if we had access to it, also what auto complete plugin are you using?

No working version, but here is the HTML for the entire page:

<?php
	session_start();
	$compare_id = session_id();
	if ($compare_id !== $_SESSION['id']) {
		header("Location: /logout.php");
	}
	if (isset($_SESSION['per_people']) && $_SESSION['per_people'] == 0) {
		header("Location: /manager/index.php");
	}
	$inactive = 600;
	if (isset($_SESSION["timeout"])) {
    	$sessionTTL = time() - $_SESSION["timeout"];
    	if ($sessionTTL > $inactive) {
        	session_destroy();
        	header("Location: /logout.php");
    	}
	}
	$_SESSION["timeout"] = time();
	
	$title = 'The Board';
	$section = 'People';
?>

<?php
	include_once ($_SERVER['DOCUMENT_ROOT'] . "/manager/includes/head.php");
	/*
	include_once ($_SERVER['DOCUMENT_ROOT'] . "/manager/controller/people.php");
	*/
	include_once ($_SERVER['DOCUMENT_ROOT'] . "/manager/view/people.php");
?>

<script type="text/javascript">
	$(document).ready(function() {
		$("#quick-search").autocomplete({
			source: "model/people-autocomplete.php",
			minLength: 1
		});
	});
</script>

</head>

<body>

<div class="wrap">
	<?php include_once ($_SERVER['DOCUMENT_ROOT'] . "/manager/includes/header.php"); ?>
	<?php include_once ($_SERVER['DOCUMENT_ROOT'] . "/manager/includes/nav.php"); ?>
	<article>
		<h2>People</h2>
		<?php
			if (isset($_POST['cancel'])) {
				$people = new People_forms;
				echo $people->People_home();
			} else if (isset($_POST['add'])) {
				$people = new People_forms;
				echo $people->People_add_family();
			/*
			} else if (isset($_POST['task']) && $_POST['task'] == 'addconfirm') {
				$users = new Users_controller;
				echo $users->Add_user_confirm();
			} else if (isset($_GET['task']) && $_GET['task'] == 'edit') {
				$users = new Users_controller;
				echo $users->Edit_user();
			} else if (isset($_POST['task']) && $_POST['task'] == 'editconfirm') {
				var_dump($_SESSION);
				$users = new Users_controller;
				echo $users->Edit_user_confirm();
			} else if ((isset($_GET['task']) && $_GET['task'] == 'delete') || (isset($_POST['task']) && $_POST['task'] == 'delete')) {
				$users = new Users_controller;
				echo $users->Delete_users();
			} else if (isset($_POST['task']) && $_POST['task'] == 'deleteconfirm') {
				$users = new Users_controller;
				echo $users->Delete_user_confirm();
			*/
			} else {
				$people = new People_forms;
				echo $people->People_home();
			}
		?>
	</article>
	<?php include_once ($_SERVER['DOCUMENT_ROOT'] . "/manager/includes/footer.php"); ?>
</div> <!-- END: .wrap -->

</body>

</html>

By the way, the PHP file returns a result like this:

[“Horbal, Barry”,“Harriott, Jaclyn”]