Installing the AJAX Suggest Application.

This document describes how to install the sample AJAX Suggestion application on your local machine. To find detailed information on how this application works please visit: http://www.dynamicajax.com/fr/AJAX_Suggest_Tutorial-271_290_312.html

You can also download the code for this application there.

All code is provided AS-IS. This code is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. You may use this code in your own applications, but I would love it if you would provide a link back to http://www.DynamicAJAX.com so that others can find my site and hopefully make use of this code and tutorial.

Requirements:

Contents of this Tutorial

You should have recieved this file in a ZIP that contains all the necessary files to run the Chat application on you machine. If you do not have any of the files listed below, you can download the tutorial from Dynamic AJAX

Installation:

Installing the AJAX Suggest application is pretty straight forward. The only piece that requires any effort is setting up the database. If you have any expirence with using MySQL on the web, this should be extreamly easy. You can either create a new database, or use an existing database for the AJAX Suggest application. If you are using an existing database for the Suggest application, simply run the suggest.sql script on your database to create the database tables. Do this either in your favorite MySQL tool, or through the MySQL command prompt with:
  source c:\path to suggest\suggest.sql

If you are creating a new database for the chat application, create a new database with:

CREATE DATABASE suggest;

Be sure to grant access to the suggest database. This code requires the old password format for PHP to be able to connect to MySQL.

GRANT ALL ON suggest.* TO myLogin IDENTIFIED BY 'myPassword';
USE mysql;
UPDATE user SET password = old_password('myPassword') WHERE user = 'myLogin';
FLUSH PRIVILEGES;
COMMIT;

Once you have created the database tables all that is left is to set the correct connection information in database.php

function db_connect($server = 'your server', $username = 'your db user name', 
	$password = 'your db password', $database = 'your database name', $link = 'db_link') {

You can now simply place suggest.html, database.php, ajax_search.js and searchSuggest.php into one of your websites directories and browse to suggest.html.

Hopefully this tutorial will give you a good introduction to AJAX technologies. If you have any questions or comments about this application, please write me at rsmith@nthcs.com, and visit http://www.DynamicAJAX.com for updates to the tutorial and other great AJAX resources.