Hey All, I am trying to write a php script and would like to have an autosuggest text box with data from a mysql database. This would be for designating a town in a form.
The sql query I would use would be.
<?php
$connection = @mysql_connect($server,$dbusername,$dbpassword) or die(mysql_error());
$db = @mysql_select_db($db_name,$connection) or die(mysql_error());
$sql = "SELECT DISTINCT `Town` FROM '".$Table_Name."' ";
$result = @mysql_query($sql,$connection)or die(mysql_error());
?>
Then there would be a second autosuggest text box that would only select cemeteries in the town from the first box.
I have found a few tutorials on the web but can't seem to get them to work with a sql query.
The tutorial that I have been trying to use is located HERE.
The demo works fine but I cant get the results to show up from the sql query above. When I tested the sql query in the test.php file that I made it seems to work fine.
Does anyone have any suggestions??? Anyhelp is appreciated.